method

remote_function

rails latest stable - Class: ActionView::Helpers::JavaScriptHelper

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1.0.0) is shown here.

remote_function(options)
public

Returns the javascript needed for a remote function. Takes the same arguments as link_to_remote.

Example:

  <select id="options" onchange="<%= remote_function(:update => "options", :url => { :action => :update_options }) %>">
    <option value="0">Hello</option>
    <option value="1">World</option>
  </select>