README.rdoc in genesis-1.0.0 vs README.rdoc in genesis-1.1.0
- old
+ new
@@ -24,10 +24,16 @@
* Only run seeds from the all and the current environment folder the task is being
executed within (ie. all seeds from db/seeds and db/seeds/production when rake
db:genesis RAILS_ENV=production)
+== COMPATABILITY
+
+* Ruby 1.8
+* Rails 3
+* Rails 2
+
== TODO
* Add option to override Rails db:seed task
* Add ability to automatically generate the down seed from the up, if possible
@@ -42,24 +48,28 @@
gem sources -a http://gemcutter.org
sudo gem install genesis
Run the prepare seeding generator to create a lib/tasks/genesis.rake file:
- script/generate prepare_seeding
+ rails generate prepare_genesis # Rails 3
+ script/generate prepare_seeding # Rails 2
Or to specify which environments to create:
- script/generate prepare_seeding env:[development,staging,production]
+ rails generate prepare_genesis [development,staging,production] # Rails 3
+ script/generate prepare_seeding env:[development,staging,production] # Rails 2
Generate a seed file:
- script/generate genesis create_users
+ rails generate genesis create_users # Rails 3
+ script/generate genesis create_users # Rails 2
This will generate a seed file for you in the db/seeds directory.
Generate a seed file in a specific environment folder:
- script/generate genesis create_users production
+ rails generate genesis create_users production # Rails 3
+ script/generate genesis create_users production # Rails 2
This will generate a seed file for you in the db/seeds/production directory.
Finally, simply populate the self.up and self.down methods of the generated seed file. The seed is a normal Ruby class.