lib/tasks/seed.rake in seedbank-0.3.0.pre vs lib/tasks/seed.rake in seedbank-0.3.0.pre2

- old
+ new

@@ -24,10 +24,14 @@ 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 + if Rails.version > '4' + original_seeds_file = Rails.application.paths["db/seeds.rb"].existent.first + else + original_seeds_file = Rails.application.paths["db/seeds"].existent.first + end 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.'