diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-02-22 18:44:57 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-02-22 18:44:57 -0300 |
commit | 353782652b7dae7573f6480439519f227c41185a (patch) | |
tree | 78e674977a408a2007df2abf33d8d23ba23f5e2d | |
parent | 1358fce5aa77982b8b7eabcad959e1799d420a2b (diff) | |
download | rails-353782652b7dae7573f6480439519f227c41185a.tar.gz rails-353782652b7dae7573f6480439519f227c41185a.tar.bz2 rails-353782652b7dae7573f6480439519f227c41185a.zip |
We are calling `to_s` in the method so we can call downcase now
-rw-r--r-- | actionview/lib/action_view/helpers/form_tag_helper.rb | 6 |
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"], |