Permalink
Browse files

refactor DebugExceptions by combining two conditionals into one

  • Loading branch information...
1 parent 4bfcae0 commit c445b076121cffb5e77235ffa14f68b2aa8b3e16 @goshakkk goshakkk committed Jan 6, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
@@ -84,8 +84,7 @@ def stderr_logger
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

0 comments on commit c445b07

Please sign in to comment.