提交 843130db 编写于 作者: P Piotr Sarnacki

Use Rails::Engine.find in commands.rb

上级 051127d4
......@@ -18,8 +18,7 @@
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册