diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-07-20 01:46:10 -0700 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-07-20 01:46:10 -0700 |
commit | eda66d89c74cd573f5c0f24877fe9bf3c6a338ba (patch) | |
tree | 3832f77546b243b263b4f582e67df05eb47dea91 | |
parent | 34b8953609cbebe70fdab3b198e4fda20a9587f9 (diff) | |
parent | 30ca90a0b642873fe0f70feb1ab8426cd9bc2d49 (diff) | |
download | rails-eda66d89c74cd573f5c0f24877fe9bf3c6a338ba.tar.gz rails-eda66d89c74cd573f5c0f24877fe9bf3c6a338ba.tar.bz2 rails-eda66d89c74cd573f5c0f24877fe9bf3c6a338ba.zip |
Merge pull request #11508 from vipulnsward/extract_constants
Extract verbs array from helper to a contant
-rw-r--r-- | actionview/lib/action_view/helpers/url_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb index daa9a393b3..a4f04b0b3b 100644 --- a/actionview/lib/action_view/helpers/url_helper.rb +++ b/actionview/lib/action_view/helpers/url_helper.rb @@ -16,7 +16,7 @@ module ActionView # provided here will only work in the context of a request # (link_to_unless_current, for instance), which must be provided # as a method called #request on the context. - + BUTTON_TAG_METHOD_VERBS = %w{patch put delete} extend ActiveSupport::Concern include TagHelper @@ -289,7 +289,7 @@ module ActionView remote = html_options.delete('remote') method = html_options.delete('method').to_s - method_tag = %w{patch put delete}.include?(method) ? method_tag(method) : ''.html_safe + method_tag = BUTTON_TAG_METHOD_VERBS.include?(method) ? method_tag(method) : ''.html_safe form_method = method == 'get' ? 'get' : 'post' form_options = html_options.delete('form') || {} |