I have a form with two text_fields:
<input type="text" id="post_name" name="post[name]" />
<input type="text" id="post_email" name="post[email]" />
And I have an observe_field on the name input box but I also want to pass the email value with it. In prototype this is done via:
<%= observe_field :post_name,
:url => { :controller => :live_validations, :action => :validate_name },
:frequency => 0.5,
:update => :post_name_message,
:with => "Form.Element.serialize('post_name','post_email')" %>
But I'm using JRails. Is there a JQuery equivalent to Form.Element.serialize? Basically something to grab the values of both input boxes and assign it to a variable.
More info on this helper is here: http://api.rubyonrails.org/classes/ActionView/Helpers/PrototypeHelper.html#M001939