1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix detection of engine in rake db:load_config

Broken by d1d7c86d0c
This commit is contained in:
Joel Cogen 2013-05-16 12:06:08 +02:00 committed by Piotr Sarnacki
parent 6167d76d9a
commit 97a4a7710e

View file

@ -44,7 +44,7 @@ module ActiveRecord
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