diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/debug_exceptions.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb index 91ef3ef9ce..e710bfe9fd 100644 --- a/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb +++ b/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb @@ -84,8 +84,7 @@ module ActionDispatch end def routes_inspector(exception) - return false unless @routes_app.respond_to?(:routes) - if exception.is_a?(ActionController::RoutingError) || exception.is_a?(ActionView::Template::Error) + if @routes_app.respond_to?(:routes) && exception.is_a?(ActionController::RoutingError) || exception.is_a?(ActionView::Template::Error) ActionDispatch::Routing::RoutesInspector.new(@routes_app.routes.routes) end end |