diff options
author | José Valim <jose.valim@gmail.com> | 2010-07-06 00:39:13 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-06 00:39:13 +0200 |
commit | 8079484b118e6dc8ffe3575b50c3857acd5b1a6d (patch) | |
tree | b9208f7b1c0fe08ef34a4390e5c97d34fba972c6 /actionpack/lib/action_dispatch | |
parent | 6671d9cdc1cc40a6cdd365902f76d4aca78a410c (diff) | |
download | rails-8079484b118e6dc8ffe3575b50c3857acd5b1a6d.tar.gz rails-8079484b118e6dc8ffe3575b50c3857acd5b1a6d.tar.bz2 rails-8079484b118e6dc8ffe3575b50c3857acd5b1a6d.zip |
Recognize should also work with route is wrapped in a constraint.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index f44c10f533..6529cf6f31 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -13,6 +13,8 @@ module ActionDispatch end end + attr_reader :app + def initialize(app, constraints, request) @app, @constraints, @request = app, constraints, request end diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 24f9981f4b..01a068a9f2 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -512,6 +512,8 @@ module ActionDispatch end dispatcher = route.app + dispatcher = dispatcher.app while dispatcher.is_a?(Mapper::Constraints) + if dispatcher.is_a?(Dispatcher) && dispatcher.controller(params, false) dispatcher.prepare_params!(params) return params |