Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

we do not need to cache rack_app

  • Loading branch information...
commit d1012b669e33342156e3109d82e7eec8c3d457a9 1 parent 8a826f5
@tenderlove tenderlove authored
Showing with 3 additions and 9 deletions.
  1. +3 −9 actionpack/lib/action_dispatch/routing/inspector.rb
View
12 actionpack/lib/action_dispatch/routing/inspector.rb
@@ -5,7 +5,7 @@ module ActionDispatch
module Routing
class RouteWrapper < SimpleDelegator
def endpoint
- rack_app ? rack_app.inspect : "#{controller}##{action}"
+ app.dispatcher? ? "#{controller}##{action}" : rack_app.inspect
end
def constraints
@@ -13,13 +13,7 @@ def constraints
end
def rack_app
- @rack_app ||= begin
- endpoint = app.app
-
- unless app.dispatcher?
- endpoint
- end
- end
+ app.app
end
def verb
@@ -72,7 +66,7 @@ def internal?
end
def engine?
- rack_app && rack_app.respond_to?(:routes)
+ rack_app.respond_to?(:routes)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.