Advanced seed data handling for Rails, make it able to separate seeds.rb.
gem 'multi_seeds_rails'
Add db/seeds
directory.
mkdir db/seeds
Locate seed files under db/seeds
.
The file name will be assigned as the task name.
touch db/seeds/dummy.rb
touch db/seeds/master.rb
bundle exec rake db:seed:dummy
# => will run `db/seeds/dummy.rb`
bundle exec rake db:seed:master
# => will run `db/seeds/master.rb`
Of course, you can run default seed.
bundle exec rake db:seed
# => will run `db/seeds.rb`
The gem is available as open source under the terms of the MIT License.