diff options
Diffstat (limited to 'actionpack/lib/action_dispatch/journey/route.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/route.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/journey/route.rb b/actionpack/lib/action_dispatch/journey/route.rb index cc3c7f20cb..1ba91d548e 100644 --- a/actionpack/lib/action_dispatch/journey/route.rb +++ b/actionpack/lib/action_dispatch/journey/route.rb @@ -19,7 +19,7 @@ module ActionDispatch # 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. - while app.is_a?(Routing::Mapper::Constraints) do + if app.is_a?(Routing::Mapper::Constraints) app = app.app end @dispatcher = app.is_a?(Routing::RouteSet::Dispatcher) |