Permalink
Browse files

one fewer is_a check

  • Loading branch information...
1 parent 8a51ec0 commit c1bc70e229be479b99bc2100e7a26059a6c107eb @tenderlove tenderlove committed May 25, 2014
Showing with 3 additions and 4 deletions.
  1. +3 −4 actionpack/lib/action_dispatch/routing/inspector.rb
@@ -14,11 +14,10 @@ def constraints
def rack_app(app = self.app)
@rack_app ||= begin
- app = app.app
- class_name = app.class.name.to_s
+ endpoint = app.app
- if ActionDispatch::Routing::Redirect === app || class_name !~ /^ActionDispatch::Routing/
- app
+ if ActionDispatch::Routing::Redirect === endpoint || !app.dispatcher?
+ endpoint
end
end
end

0 comments on commit c1bc70e

Please sign in to comment.