diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index db3ad9662b37c07a3b624cbaf1314679a66006a2..5469f779b32398b9869e4caa57ea9a998662d6f8 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Allow use of the :with option for submit_to_remote #1936 [jon@instance-design.co.uk] + * AbstractRequest#domain returns nil when host is an ip address #2012 [kevin.clark@gmail.com] * ActionController documentation update #2051 [fbeausoleil@ftml.net] diff --git a/actionpack/lib/action_view/helpers/javascript_helper.rb b/actionpack/lib/action_view/helpers/javascript_helper.rb index 76be539332c18fe717581f5ec2466541ba5f57a3..2bd741bd79d2afe02a69a711a609fa2923117d4e 100644 --- a/actionpack/lib/action_view/helpers/javascript_helper.rb +++ b/actionpack/lib/action_view/helpers/javascript_helper.rb @@ -153,7 +153,7 @@ def form_remote_tag(options = {}) # Returns a button input tag that will submit form using XMLHttpRequest in the background instead of regular # reloading POST arrangement. options argument is the same as in form_remote_tag def submit_to_remote(name, value, options = {}) - options[:with] = 'Form.serialize(this.form)' + options[:with] ||= 'Form.serialize(this.form)' options[:html] ||= {} options[:html][:type] = 'button'