aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2016-02-22 18:44:57 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2016-02-22 18:44:57 -0300
commit353782652b7dae7573f6480439519f227c41185a (patch)
tree78e674977a408a2007df2abf33d8d23ba23f5e2d /actionview
parent1358fce5aa77982b8b7eabcad959e1799d420a2b (diff)
downloadrails-353782652b7dae7573f6480439519f227c41185a.tar.gz
rails-353782652b7dae7573f6480439519f227c41185a.tar.bz2
rails-353782652b7dae7573f6480439519f227c41185a.zip
We are calling `to_s` in the method so we can call downcase now
Diffstat (limited to 'actionview')
-rw-r--r--actionview/lib/action_view/helpers/form_tag_helper.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb
index 55dac74d00..82e9ace428 100644
--- a/actionview/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionview/lib/action_view/helpers/form_tag_helper.rb
@@ -862,13 +862,13 @@ module ActionView
def extra_tags_for_form(html_options)
authenticity_token = html_options.delete("authenticity_token")
- method = html_options.delete("method").to_s
+ method = html_options.delete("method").to_s.downcase
method_tag = case method
- when /^get$/i # must be case-insensitive, but can't use downcase as might be nil
+ when 'get'
html_options["method"] = "get"
''
- when /^post$/i, "", nil
+ when 'post', ''
html_options["method"] = "post"
token_tag(authenticity_token, form_options: {
action: html_options["action"],