Browse files

DG IZ; added rake db:reset, which aliases a delete and seed to the db

  • Loading branch information...
1 parent f7e4f1d commit 6d84eb2b6fdd5d4cc9cd182ac332087ec13873a5 @danielgrippi danielgrippi committed Jun 30, 2010
Showing with 6 additions and 1 deletion.
  1. +0 −1 db/seeds.rb
  2. +6 −0 lib/tasks/db.rake
View
1 db/seeds.rb
@@ -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" ))
View
6 lib/tasks/db.rake
@@ -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

0 comments on commit 6d84eb2

Please sign in to comment.