Skip to content

Commit cd2dee2

Browse files
authored
Merge pull request rails#54388 from skipkayhil/hm-followup-54227
Skip inflector when generating HTTP_METHOD_LOOKUP
2 parents 43a27e5 + 7bc0976 commit cd2dee2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

actionpack/lib/action_dispatch/http/request.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def key?(key)
138138

139139
# Populate the HTTP method lookup cache.
140140
HTTP_METHODS.each { |method|
141-
HTTP_METHOD_LOOKUP[method] = method.downcase.underscore.to_sym
141+
HTTP_METHOD_LOOKUP[method] = method.downcase.tap { |m| m.tr!("-", "_") }.to_sym
142142
}
143143

144144
alias raw_request_method request_method # :nodoc:

0 commit comments

Comments
 (0)