DG IZ; added rake db:reset, which aliases a delete and seed to the db
This commit is contained in:
parent
f7e4f1db32
commit
6d84eb2b6f
2 changed files with 6 additions and 1 deletions
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
require 'config/environment'
|
||||
|
||||
|
||||
# Create seed user
|
||||
User.create( :email => "a@a.com", :password => "aaaaaa", :profile => Profile.create( :first_name => "Robert", :last_name => "Grimm" ))
|
||||
|
||||
|
|
|
|||
|
|
@ -12,4 +12,10 @@ namespace :db do
|
|||
Person.delete_all
|
||||
Profile.delete_all
|
||||
end
|
||||
|
||||
desc 'Purge and seed the current RAILS_ENV database using information from db/seeds.rb'
|
||||
task :reset do
|
||||
Rake::Task['db:delete'].invoke
|
||||
Rake::Task['db:seed'].invoke
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue