From 84d38f6033a0eca73feb0eb8c43d99913b0204cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 26 Dec 2012 12:15:18 -0300 Subject: We need to check explictly that env['action_dispatch.show_exceptions'] is false. If it is nil we can't raise the exception --- actionpack/lib/action_dispatch/middleware/debug_exceptions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/middleware') diff --git a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb index 287b4ce2ff..6705e531cb 100644 --- a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb @@ -23,7 +23,7 @@ module ActionDispatch raise ActionController::RoutingError, "No route matches [#{env['REQUEST_METHOD']}] #{env['PATH_INFO'].inspect}" end rescue Exception => exception - raise exception unless env['action_dispatch.show_exceptions'] + raise exception if env['action_dispatch.show_exceptions'] == false end exception ? render_exception(env, exception) : response -- cgit v1.2.3