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

We need to check explictly that env['action_dispatch.show_exceptions']

is false.

If it is nil we can't raise the exception
This commit is contained in:
Rafael Mendonça França 2012-12-26 12:15:18 -03:00
parent 8fe1dfd221
commit 84d38f6033

View file

@ -23,7 +23,7 @@ module ActionDispatch
raise ActionController::RoutingError, "No route matches [#{env['REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}" raise ActionController::RoutingError, "No route matches [#{env['REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}"
end end
rescue Exception => exception rescue Exception => exception
raise exception unless env['action_dispatch.show_exceptions'] raise exception if env['action_dispatch.show_exceptions'] == false
end end
exception ? render_exception(env, exception) : response exception ? render_exception(env, exception) : response