mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Use Rails::Engine.find in commands.rb
This commit is contained in:
@@ -18,8 +18,7 @@ when 'generate', 'destroy', 'plugin'
|
||||
require APP_PATH
|
||||
Rails.application.require_environment!
|
||||
|
||||
if defined?(ENGINE_PATH)
|
||||
engine = Rails.application.railties.engines.find { |r| r.root.to_s == ENGINE_PATH }
|
||||
if defined?(ENGINE_PATH) && engine = Rails::Engine.find(ENGINE_PATH)
|
||||
Rails.application = engine
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user