:with option

What does the :with option do? Here is the code that I am referencing:

<% func = remote_function( :update => ‘exclude_1’, :url => {:action =>
‘set_exclude_airline_1’, :id => @user.id}, :with => “‘id=’ +
escape(value)” ) -%>

What does the :with option do? Here is the code that I am referencing:

<% func = remote_function( :update => ‘exclude_1’, :url => {:action =>
‘set_exclude_airline_1’, :id => @user.id}, :with => “‘id=’ +
escape(value)” ) -%>

:with: A JavaScript expression specifying the parameters for the
XMLHttpRequest. This defaults to value, which in the evaluated context
refers to the new field value. If you specify a string without a “=”,
itll
be extended to mean the form key that the value should be assigned to.
So
:with => “term” gives “term=value”. If a “=” is present, no extension
will
happen.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs