lib/tasks/seed.rake in seedbank-0.2.1 vs lib/tasks/seed.rake in seedbank-0.3.0.pre
- old
+ new
@@ -23,12 +23,14 @@
desc "Load the seed data from db/seeds.rb, db/seeds/*.seeds.rb and db/seeds/#{environment}/*.seeds.rb."
task environment => ['db:seed:common'] + environment_dependencies
override_dependency << "db:seed:#{environment}" if defined?(Rails) && Rails.env == environment
end
+
+ original_seeds_file = Rails.application.paths["db/seeds"].existent.first
+ define_seed_task original_seeds_file, :original if original_seeds_file
end
# Override db:seed to run all the common and environments seeds plus the original db:seed.
- desc "Load the seed data from db/seeds.rb, db/seeds/*.seeds.rb and db/seeds/ENVIRONMENT/*.seeds.rb. ENVIRONMENT is the current environment in Rails.env."
+ desc 'Load the seed data from db/seeds.rb, db/seeds/*.seeds.rb and db/seeds/ENVIRONMENT/*.seeds.rb. ENVIRONMENT is the current environment in Rails.env.'
override_seed_task :seed => override_dependency
-
end