Skip to content
Browse files

Merge pull request #10640 from joelcogen/master

Fix detection of engine in rake db:load_config
  • Loading branch information...
2 parents 9986058 + 2583e8a commit 70a36487830a6e47dadfe5893d9a5782782ff4ff @drogus drogus committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/railtie.rb
View
2 activerecord/lib/active_record/railtie.rb
@@ -44,7 +44,7 @@ class Railtie < Rails::Railtie # :nodoc:
ActiveRecord::Tasks::DatabaseTasks.migrations_paths = Rails.application.paths['db/migrate'].to_a
ActiveRecord::Tasks::DatabaseTasks.fixtures_path = File.join Rails.root, 'test', 'fixtures'
- if defined?(ENGINE_PATH) && engine = Rails::Engine.find(ENGINE_PATH)
+ if engine = Rails::Engine.find(find_engine_path(APP_RAKEFILE))
if engine.paths['db/migrate'].existent
ActiveRecord::Tasks::DatabaseTasks.migrations_paths += engine.paths['db/migrate'].to_a
end

0 comments on commit 70a3648

Please sign in to comment.
Something went wrong with that request. Please try again.