提交 0189fb76 编写于 作者: J José Valim

reload_routes! was still referencing old Rails::Application.

上级 2ef8a2b4
......@@ -121,14 +121,13 @@ def routes_reloader
end
def reload_routes!
routes = Rails::Application.routes
routes.disable_clear_and_finalize = true
routes.clear!
_routes = self.routes
_routes.disable_clear_and_finalize = true
_routes.clear!
routes_reloader.paths.each { |path| load(path) }
ActiveSupport.on_load(:action_controller) { routes.finalize! }
ActiveSupport.on_load(:action_controller) { _routes.finalize! }
ensure
routes.disable_clear_and_finalize = false
_routes.disable_clear_and_finalize = false
end
def initialize!
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册