Skip to content
Advanced seed data handling for Rails, make it able to separate seeds.rb.
Ruby HTML JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
lib
test/dummy
.gitignore
Gemfile
Gemfile.lock
MIT-LICENSE
README.md
Rakefile
_config.yml
multi_seeds_rails.gemspec

README.md

MultiSeedsRails

Advanced seed data handling for Rails, make it able to separate seeds.rb.

Installation

gem 'multi_seeds_rails'

Usage

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`

License

The gem is available as open source under the terms of the MIT License.

You can’t perform that action at this time.