Browse files

Merge pull request #8785 from goshakkk/refactor-debug-exceptions

Refactor DebugExceptions
  • Loading branch information...
2 parents 813e4cc + c445b07 commit fb7c093d931e808164e7ab7b66f26d6227264549 @rafaelfranca rafaelfranca committed Jan 6, 2013
Showing with 1 addition and 2 deletions.
  1. +1 −2 actionpack/lib/action_dispatch/middleware/debug_exceptions.rb
View
3 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 fb7c093

Please sign in to comment.