diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-06-22 19:34:37 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-06-22 19:34:37 -0300 |
commit | 75b63de5edae7dc12c2518337217d93067e8bc37 (patch) | |
tree | ede858171354f103ecc62a20773f05d1abe0af31 /actionpack/lib/action_dispatch | |
parent | ccdefa0e230dac72ae35e41791ec5fa53117e91e (diff) | |
parent | 34a52c6bce2f97398cef4790e49739ef8f865d11 (diff) | |
download | rails-75b63de5edae7dc12c2518337217d93067e8bc37.tar.gz rails-75b63de5edae7dc12c2518337217d93067e8bc37.tar.bz2 rails-75b63de5edae7dc12c2518337217d93067e8bc37.zip |
Merge pull request #19431 from hmarr/head-routing
Respect routing precedence for HEAD requests
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/journey/router.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/journey/router.rb b/actionpack/lib/action_dispatch/journey/router.rb index cc4bd6105d..b84aad8eb6 100644 --- a/actionpack/lib/action_dispatch/journey/router.rb +++ b/actionpack/lib/action_dispatch/journey/router.rb @@ -121,7 +121,8 @@ module ActionDispatch end def match_head_routes(routes, req) - head_routes = match_routes(routes, req) + verb_specific_routes = routes.reject { |route| route.verb == // } + head_routes = match_routes(verb_specific_routes, req) if head_routes.empty? begin |