Permalink
Browse files

Initial import

git-svn-id: https://db-populate.googlecode.com/svn/trunk@2 f88e3d0c-0140-0410-ae37-a51a81e078ed
  • Loading branch information...
joshknowles
joshknowles committed Nov 28, 2007
1 parent 140a8c1 commit 48523f662b62f228224706dd1e8c38336fa0ecbd
Showing with 7 additions and 0 deletions.
  1. +7 −0 tasks/populate.rake
View
@@ -0,0 +1,7 @@
+namespace :db do
+ desc "Loads initial database models for the current environment."
+ task :populate => :environment do
+ Dir[File.join(RAILS_ROOT, 'db', 'fixtures', '*.rb')].sort.each { |fixture| load fixture }
+ Dir[File.join(RAILS_ROOT, 'db', 'fixtures', RAILS_ENV, '*.rb')].sort.each { |fixture| load fixture }
+ end
+end

0 comments on commit 48523f6

Please sign in to comment.