From 0347280035db63a43e2103166469ffa93e8e1808 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Sun, 22 Mar 2015 20:27:00 -0300 Subject: [PATCH] Simplify setting button form options No need to merge hashes when simply setting options does the job. --- actionview/lib/action_view/helpers/url_helper.rb | 5 +++-- 1 file 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 : ''