Last active
August 29, 2015 14:01
-
-
Save lukaszx0/1e834a91d03e2493a15e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb | |
index a8368b6..abe4d71 100644 | |
--- a/actionpack/lib/action_dispatch/routing/route_set.rb | |
+++ b/actionpack/lib/action_dispatch/routing/route_set.rb | |
@@ -500,11 +500,11 @@ module ActionDispatch | |
end | |
def recognize_path(path, environment = {}) | |
- method = (environment[:method] || "GET").to_s.upcase | |
+ environment[:method] = (environment[:method] || "GET").to_s.upcase | |
path = Rack::Mount::Utils.normalize_path(path) unless path =~ %r{://} | |
begin | |
- env = Rack::MockRequest.env_for(path, {:method => method}) | |
+ env = Rack::MockRequest.env_for(path, environment) | |
rescue URI::InvalidURIError => e | |
raise ActionController::RoutingError, e.message | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment