diff options
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route.rb b/actionpack/lib/action_dispatch/routing/route.rb index e3aaa29e76..f1431e7a37 100644 --- a/actionpack/lib/action_dispatch/routing/route.rb +++ b/actionpack/lib/action_dispatch/routing/route.rb @@ -27,8 +27,13 @@ module ActionDispatch end def verb - if verb = conditions[:verb] - verb.to_s.upcase + if method = conditions[:request_method] + case method + when Regexp + method.source.upcase + else + method.to_s.upcase + end end end |