Permalink
Browse files

Fix detection of engine in rake db:load_config

Broken by d1d7c86
  • Loading branch information...
1 parent 6167d76 commit 97a4a7710e840ca60d5e822a0d771af80c2e024d @joelcogen joelcogen committed with drogus May 16, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 97a4a77

Please sign in to comment.