Is it possible to use the :with option with remote_form_for?
It works with link_to_remote, and the api docs seems to indicate :with should work with any of the remote_ methods.
Here is the code I'm using, and output it's producing:
Link_to_remote (works):
= link_to_remote 'ARGH', {:url => {:action => 'load_item', :id => @policy.id} , :with => "'elephant=mouse'"}
<a href="#" onclick="new Ajax.Request('http://localhost:3000/quote_edit/load_item/5', {asynchronous:true, evalScripts:true, parameters:'elephant=mouse' + '&authenticity_token=' + encodeURIComponent('o6whEDZLuq1b1NsuZXIlNjc3iudZNC8jU+ZxgUDXFUk=')}); return false;">arg</a>
Remote_form_for (doesn't work)
= remote_form_for :policy, @policy, :url => {:action => 'load_item', :id => @policy.id} , :with => "'elephant=mouse'" do |f|
<form action="http://localhost:3000/quote_edit/load_item/5" method="post" onsubmit="new Ajax.Request('http://localhost:3000/quote_edit/load_item/5', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;">
Does anyone know how to make remote_form_for pick up on this option?
Or is it being ignored by remote_form_for as it needs to use parameters:Form.serialize(this)
to pick up the values from the current form?
Cheers Dave Smylie