From 633589c1405990bde9ebd8cdde096f58c7e376bb Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sat, 24 May 2014 19:03:12 -0700 Subject: push is_a?(Dispatcher) check in to one place --- actionpack/lib/action_dispatch/journey/route.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'actionpack/lib/action_dispatch/journey/route.rb') diff --git a/actionpack/lib/action_dispatch/journey/route.rb b/actionpack/lib/action_dispatch/journey/route.rb index 1ba91d548e..9f0a3af902 100644 --- a/actionpack/lib/action_dispatch/journey/route.rb +++ b/actionpack/lib/action_dispatch/journey/route.rb @@ -16,14 +16,6 @@ module ActionDispatch @app = app @path = path - # Unwrap any constraints so we can see what's inside for route generation. - # This allows the formatter to skip over any mounted applications or redirects - # that shouldn't be matched when using a url_for without a route name. - if app.is_a?(Routing::Mapper::Constraints) - app = app.app - end - @dispatcher = app.is_a?(Routing::RouteSet::Dispatcher) - @constraints = constraints @defaults = defaults @required_defaults = nil @@ -99,7 +91,7 @@ module ActionDispatch end def dispatcher? - @dispatcher + @app.dispatcher? end def matches?(request) -- cgit v1.2.3