aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/form_tag_helper.rb
diff options
context:
space:
mode:
authorGonzalo Rodriguez and Leonardo Capillera <gonzalo+leonardo@wyeworks.com>2011-08-10 23:07:38 -0300
committerGonzalo Rodriguez <gonzalo@wyeworks.com>2011-08-10 23:14:56 -0300
commit9e81bfd8fc8a35b28683b3e6b31cd2105b94bb55 (patch)
tree23b0b897a60040ae7acba06474c977a23c5ce39c /actionpack/lib/action_view/helpers/form_tag_helper.rb
parentd00e1646f7f0faaddf0f89f3051d165aadb2567b (diff)
downloadrails-9e81bfd8fc8a35b28683b3e6b31cd2105b94bb55.tar.gz
rails-9e81bfd8fc8a35b28683b3e6b31cd2105b94bb55.tar.bz2
rails-9e81bfd8fc8a35b28683b3e6b31cd2105b94bb55.zip
Remove 'parameters_for_url' parameter from 'form_tag' method signature
If you use that parameter it will end calling to url_for with two arguments, which fails because url_for expects only one
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_tag_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/form_tag_helper.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb
index 2bbe0c175f..9ed4611123 100644
--- a/actionpack/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -56,8 +56,8 @@ module ActionView
# form_tag('http://far.away.com/form', :authenticity_token => "cf50faa3fe97702ca1ae")
# # form with custom authenticity token
#
- def form_tag(url_for_options = {}, options = {}, *parameters_for_url, &block)
- html_options = html_options_for_form(url_for_options, options, *parameters_for_url)
+ def form_tag(url_for_options = {}, options = {}, &block)
+ html_options = html_options_for_form(url_for_options, options)
if block_given?
form_tag_in_block(html_options, &block)
else
@@ -604,12 +604,12 @@ module ActionView
end
private
- def html_options_for_form(url_for_options, options, *parameters_for_url)
+ def html_options_for_form(url_for_options, options)
options.stringify_keys.tap do |html_options|
html_options["enctype"] = "multipart/form-data" if html_options.delete("multipart")
# The following URL is unescaped, this is just a hash of options, and it is the
# responsibility of the caller to escape all the values.
- html_options["action"] = url_for(url_for_options, *parameters_for_url)
+ html_options["action"] = url_for(url_for_options)
html_options["accept-charset"] = "UTF-8"
html_options["data-remote"] = true if html_options.delete("remote")
html_options["authenticity_token"] = html_options.delete("authenticity_token") if html_options.has_key?("authenticity_token")