Add progress output
This commit is contained in:
parent
48523f662b
commit
f2e151bf52
@ -1,7 +1,14 @@
|
|||||||
namespace :db do
|
amespace :db do
|
||||||
desc "Loads initial database models for the current environment."
|
desc "Loads initial database models for the current environment."
|
||||||
task :populate => :environment do
|
task :populate => :environment do
|
||||||
Dir[File.join(RAILS_ROOT, 'db', 'fixtures', '*.rb')].sort.each { |fixture| load fixture }
|
require File.join(File.dirname(__FILE__), '/../../lib', 'create_or_update')
|
||||||
Dir[File.join(RAILS_ROOT, 'db', 'fixtures', RAILS_ENV, '*.rb')].sort.each { |fixture| load fixture }
|
Dir[File.join(RAILS_ROOT, 'db', 'populate', '*.rb')].sort.each do |fixture|
|
||||||
|
load fixture
|
||||||
|
puts "Loaded #{fixture}"
|
||||||
|
end
|
||||||
|
Dir[File.join(RAILS_ROOT, 'db', 'populate', RAILS_ENV, '*.rb')].sort.each do |fixture|
|
||||||
|
load fixture
|
||||||
|
puts "Loaded #{fixture}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
Loading…
Reference in New Issue
Block a user