Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Refactor DebugExceptions #8785

Merged
merged 1 commit into from

2 participants

@goshakkk

Combine two conditionals into one.

@rafaelfranca
Owner

We avoid to use of try, presence or any active support extension where is possible. This fall in cosmetic changes and we don't accept cosmetics changes.

The last change is valid.

@goshakkk

I thought it is encouraged to use as much of ActiveSupport extensions as possible. Thanks for pointing out it is not.

Reverted the first two changes.

@rafaelfranca rafaelfranca merged commit fb7c093 into rails:master
@goshakkk goshakkk deleted the goshakkk:refactor-debug-exceptions branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
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
Something went wrong with that request. Please try again.