https://github.com/tanakaworld/multi_seeds_rails
Advanced seed data handling for Rails, make it able to separate seeds.rb.
https://github.com/tanakaworld/multi_seeds_rails
rails seed seeds
Last synced: 2 months ago
JSON representation
Advanced seed data handling for Rails, make it able to separate seeds.rb.
- Host: GitHub
- URL: https://github.com/tanakaworld/multi_seeds_rails
- Owner: tanakaworld
- License: mit
- Created: 2018-06-26T04:32:55.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-26T04:37:18.000Z (almost 7 years ago)
- Last Synced: 2025-04-04T08:47:25.488Z (2 months ago)
- Topics: rails, seed, seeds
- Language: Ruby
- Homepage: https://rubygems.org/gems/multi_seeds_rails
- Size: 25.4 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# MultiSeedsRails
Advanced seed data handling for Rails, make it able to separate seeds.rb.
## Installation
```ruby
gem 'multi_seeds_rails'
```## Usage
Add `db/seeds` directory.
```bash
mkdir db/seeds
```Locate seed files under `db/seeds`.
The file name will be assigned as the task name.```bash
touch db/seeds/dummy.rb
touch db/seeds/master.rb
``````bash
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.
```bash
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](https://opensource.org/licenses/MIT).