diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-29 11:57:02 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-02-29 11:57:02 -0800 |
commit | 1d215286c9019a0fa98e87bffccc8fc2b97d5a46 (patch) | |
tree | 9195b8636b024fcc6d7acd0abeaeceef2b7bf685 /actionpack/lib/action_dispatch/routing | |
parent | 4244a09c530edafbb5b4186e84f6313321df4189 (diff) | |
parent | d7bf930df5f508a0a201c8511376fb62fa22ff68 (diff) | |
download | rails-1d215286c9019a0fa98e87bffccc8fc2b97d5a46.tar.gz rails-1d215286c9019a0fa98e87bffccc8fc2b97d5a46.tar.bz2 rails-1d215286c9019a0fa98e87bffccc8fc2b97d5a46.zip |
Merge pull request #5219 from mattfawcett/2781-fix-querystring-route-constraint-for-testing
Fix for #2781
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 57c6972078..0ec4e41470 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -594,6 +594,7 @@ module ActionDispatch def recognize_path(path, environment = {}) method = (environment[:method] || "GET").to_s.upcase path = Journey::Router::Utils.normalize_path(path) unless path =~ %r{://} + extras = environment[:extras] || {} begin env = Rack::MockRequest.env_for(path, {:method => method}) @@ -603,6 +604,7 @@ module ActionDispatch req = @request_class.new(env) @router.recognize(req) do |route, matches, params| + params.merge!(extras) params.each do |key, value| if value.is_a?(String) value = value.dup.force_encoding(Encoding::BINARY) |