0.0
No commit activity in last 3 years
No release in over 3 years
seed scatter changes some utility for rails seed files
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.5.1
~> 1.3
~> 1.3.3
>= 0
~> 2.13.0

Runtime

>= 3.0.0
 Project Readme

SeedScatter

SeedScatter is a gem that adds utility and organization to Ruby on Rails seed files by scattering them into multiple files.

SeedScatter allows you to:

  • Separate seeds into model specific files
  • Dump model information already in the database to their respective seed files

Installation

Add it to your Gemfile:

gem 'seed_scatter'

And then run:

$ bundle install

Or install it yourself as:

$ gem install seed_scatter

Usage

SeedScatter overrides the default rake task db:seed to separate seeds. Seeding is still just as easy as it was before:

$ rake db:seed

To dump a specific model's information from the database to a seed file:

$ rake db:harvest[MODEL_NAME]

To dump all of your models' information from the database to their respective seed files:

$ rake db:harvest

To re-seed a specific model:

$ rake db:reseed[MODEL_NAME]

Todos

  • Support for namespaced models
  • Support for join tables

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request