Permalink
Browse files

Fix `rake routes` method name output [#3422 state:resolved]

  • Loading branch information...
1 parent 6083a87 commit 55ae53baadf37daf2c966bf5d9d67c1f954cb681 @josh josh committed Oct 26, 2009
Showing with 7 additions and 2 deletions.
  1. +7 −2 actionpack/lib/action_dispatch/routing/route.rb
View
9 actionpack/lib/action_dispatch/routing/route.rb
@@ -27,8 +27,13 @@ def initialize(app, conditions = {}, requirements = {}, defaults = {}, name = ni
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

0 comments on commit 55ae53b

Please sign in to comment.