提交 4d177d46 编写于 作者: J José Valim

Routes should not swallow all NameErrors [#3862 status:resolved].

上级 5384df55
......@@ -44,7 +44,8 @@ def controller(params)
controller = "#{params[:controller].camelize}Controller"
ActiveSupport::Inflector.constantize(controller)
end
rescue NameError
rescue NameError => e
raise unless e.message.include?(controller)
nil
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册