README.rdoc in seed_dump-0.4.3 vs README.rdoc in seed_dump-0.5.0

- old
+ new

@@ -40,11 +40,11 @@ Use another output file instead of db/seeds.rb rake db:seed:dump FILE=db/categories.rb -By default the :id column will not be added to the generated Create statements +By default the :id column will not be added to the generated create statements. If you do want the :id to be included use WITH_ID: rake db:seed:dump WITH_ID=1 If you don't want +seed_dump+ to dump any data allready available in the database use NO_DATA. @@ -52,17 +52,24 @@ This will generate the dump with only 1 empty create statement. It's up to you to edit these and change the values into something meaningful: rake db:seed:dump MODEL=User NO_DATA=1 APPEND=true +If you want the dump to use `create!` rather than `create`: + + rake db:seed:dump CREATE_METHOD='create!' + Here is a full example using all of the options above: - rake db:seed:dump MODELS=Category LIMIT=10 APPEND=true FILE=db/categories.rb WITH_ID=1 NO_DATA=1 + rake db:seed:dump MODELS=Category LIMIT=10 APPEND=true FILE=db/categories.rb WITH_ID=1 NO_DATA=1 CREATE_METHOD='create!' == All environment variables APPEND: Append the data to db/seeds.rb instead of overwriting it. + +CREATE_METHOD: + Use the specified create method rather than 'create' (the default). Note: if you are using bash and want to use 'create!', be sure to use single quotes on the command line (i.e. CREATE_METHOD='create!'). FILE: Use a different output file, default: db/seeds.rb LIMIT: