diff options
author | Gosha Arinich <me@goshakkk.name> | 2013-01-07 01:52:50 +0300 |
---|---|---|
committer | Gosha Arinich <me@goshakkk.name> | 2013-01-07 02:46:03 +0300 |
commit | c445b076121cffb5e77235ffa14f68b2aa8b3e16 (patch) | |
tree | 6e9dbeb46419419358253f7061ac2156de2d3c53 /actionpack/lib/action_dispatch/middleware | |
parent | 4bfcae0b6723146aa18fec49b5311db9d3939044 (diff) | |
download | rails-c445b076121cffb5e77235ffa14f68b2aa8b3e16.tar.gz rails-c445b076121cffb5e77235ffa14f68b2aa8b3e16.tar.bz2 rails-c445b076121cffb5e77235ffa14f68b2aa8b3e16.zip |
refactor DebugExceptions by combining two conditionals into one
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware')
-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 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 |