aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2013-09-10 13:23:57 -0700
committerSteve Klabnik <steve@steveklabnik.com>2013-09-10 13:23:57 -0700
commitcff8d1d24da1237a2f4d44e46f5ec486cd6ba32d (patch)
tree5ca90edd845be7afa673991cfa7084cc71174aa1 /actionpack/lib/action_dispatch/routing
parent143e00954619f3ce86e08f72ba7927c6f8991062 (diff)
parent03ac291526b04586a0f0db0f531f18f14be792c6 (diff)
downloadrails-cff8d1d24da1237a2f4d44e46f5ec486cd6ba32d.tar.gz
rails-cff8d1d24da1237a2f4d44e46f5ec486cd6ba32d.tar.bz2
rails-cff8d1d24da1237a2f4d44e46f5ec486cd6ba32d.zip
Merge pull request #9368 from CrowdFlower/3-2-stable
PR #5219 backported to 3-2
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r--actionpack/lib/action_dispatch/routing/route_set.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb
index 6e63f92ff3..d9671a4932 100644
--- a/actionpack/lib/action_dispatch/routing/route_set.rb
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb
@@ -611,9 +611,10 @@ 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})
+ env = Rack::MockRequest.env_for(path, {:method => method, :params => extras})
rescue URI::InvalidURIError => e
raise ActionController::RoutingError, e.message
end