diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-24 19:03:12 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-24 19:03:12 -0700 |
commit | 633589c1405990bde9ebd8cdde096f58c7e376bb (patch) | |
tree | 29d28b2f2f5b756ea9776231ed66590fde09f5b6 /actionpack/lib/action_dispatch/journey | |
parent | 229c9ed89658cabd74764b7f5a2509bee33d364c (diff) | |
download | rails-633589c1405990bde9ebd8cdde096f58c7e376bb.tar.gz rails-633589c1405990bde9ebd8cdde096f58c7e376bb.tar.bz2 rails-633589c1405990bde9ebd8cdde096f58c7e376bb.zip |
push is_a?(Dispatcher) check in to one place
Diffstat (limited to 'actionpack/lib/action_dispatch/journey')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/route.rb | 10 |
1 files changed, 1 insertions, 9 deletions
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) |