From 55ae53baadf37daf2c966bf5d9d67c1f954cb681 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Mon, 26 Oct 2009 11:23:39 -0500 Subject: [PATCH] Fix `rake routes` method name output [#3422 state:resolved] --- actionpack/lib/action_dispatch/routing/route.rb | 9 +++++++-- 1 file 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