Skip to main content
Version: v3.0

Seeding Data

Seeding data is a way to populate your database with data. This is useful in all environments, but especially in development and test environments. Rhino seeding is based on the Rails seeding system

Rhino configures the standard db/seeds.rb file to load common and per environment seeds. Running rails db:seed or rails db:reset will load all common and per environment seeds.

Common Seeds

Some seeds are common to all environments. These seeds are located in db/seeds/*.rb. These file are loaded by default in all environments.

Per Environment Seeds

Some seeds are specific to an environment. These seeds are located in db/seeds/<environment>/*.rb. These files are loaded only in the specified environment.