Skip to content

Commit

Permalink
DG IZ; added rake db:reset, which aliases a delete and seed to the db
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgrippi committed Jun 30, 2010
1 parent f7e4f1d commit 6d84eb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion db/seeds.rb
Expand Up @@ -8,7 +8,6 @@


require 'config/environment' require 'config/environment'



# Create seed user # Create seed user
User.create( :email => "a@a.com", :password => "aaaaaa", :profile => Profile.create( :first_name => "Robert", :last_name => "Grimm" )) User.create( :email => "a@a.com", :password => "aaaaaa", :profile => Profile.create( :first_name => "Robert", :last_name => "Grimm" ))


Expand Down
6 changes: 6 additions & 0 deletions lib/tasks/db.rake
Expand Up @@ -12,4 +12,10 @@ namespace :db do
Person.delete_all Person.delete_all
Profile.delete_all Profile.delete_all
end 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 end

0 comments on commit 6d84eb2

Please sign in to comment.