aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/url_helper.rb
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2015-03-22 20:27:00 -0300
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2015-03-22 20:27:01 -0300
commit0347280035db63a43e2103166469ffa93e8e1808 (patch)
tree7f044b51fc5d6caa9140f6f91f857a244e9a3e9b /actionview/lib/action_view/helpers/url_helper.rb
parenta3f030686bbcfb215ae5635e1c7a92d0346db732 (diff)
downloadrails-0347280035db63a43e2103166469ffa93e8e1808.tar.gz
rails-0347280035db63a43e2103166469ffa93e8e1808.tar.bz2
rails-0347280035db63a43e2103166469ffa93e8e1808.zip
Simplify setting button form options
No need to merge hashes when simply setting options does the job.
Diffstat (limited to 'actionview/lib/action_view/helpers/url_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/url_helper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb
index 4c436bce25..89b96ac42c 100644
--- a/actionview/lib/action_view/helpers/url_helper.rb
+++ b/actionview/lib/action_view/helpers/url_helper.rb
@@ -292,8 +292,9 @@ module ActionView
form_method = method == 'get' ? 'get' : 'post'
form_options = html_options.delete('form') || {}
form_options[:class] ||= html_options.delete('form_class') || 'button_to'
- form_options.merge!(method: form_method, action: url)
- form_options.merge!("data-remote" => "true") if remote
+ form_options[:method] = form_method
+ form_options[:action] = url
+ form_options[:'data-remote'] = true if remote
request_token_tag = form_method == 'post' ? token_tag : ''