aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-01-06 15:49:33 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-01-06 15:49:33 -0800
commitfb7c093d931e808164e7ab7b66f26d6227264549 (patch)
tree1c6fc60fe5b12cbedf084aa3bdd92cbf3e11e7e7
parent813e4cc14233d8c87b6b7165592c48998af48072 (diff)
parentc445b076121cffb5e77235ffa14f68b2aa8b3e16 (diff)
downloadrails-fb7c093d931e808164e7ab7b66f26d6227264549.tar.gz
rails-fb7c093d931e808164e7ab7b66f26d6227264549.tar.bz2
rails-fb7c093d931e808164e7ab7b66f26d6227264549.zip
Merge pull request #8785 from goshakkk/refactor-debug-exceptions
Refactor DebugExceptions
-rw-r--r--actionpack/lib/action_dispatch/middleware/debug_exceptions.rb3
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 3f1cf14825..1a2758380b 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