Reset the database (purge all), then seed a database

Blankman picture Blankman · Oct 23, 2010 · Viewed 108.3k times · Source

Is there a rake command to wipe out the data in the database tables?

How do I create a db:seed script to pre-fill data to my tables?

Answer

JackCA picture JackCA · Oct 23, 2010

I use rake db:reset which drops and then recreates the database and includes your seeds.rb file. http://guides.rubyonrails.org/migrations.html#resetting-the-database