In 3.0.9 and below, form_for() could accept a :remote option passed in either options or options[:html]. However, any :remote option passed in as options[:html][:remote] is ignored because of the line:
options[:html][:remote] = options.delete(:remote)
I've changed this to:
options[:html][:remote] = options.delete(:remote) if options.has_key?(:remote)
This resolves issue #2094 and keeps Rails 3.1 consistent with prior versions. Furthermore, this change keeps form_for() consistent with other methods such as link_to() that allow the :remote option to be passed in the same hash as other html options.
fixed problem in which options[:html][:remote] would be overridden in…
… form_for() - fixes #2094
Please add a test case.
added test case for fix to issue #2094
I merged the changes into a local copy of 3_1_stable and the tests seem to pass. Changes look correct.
@gregmalcolm - Thanks for following up on this!