views:

116

answers:

1

In this example,

<%=button_to_remote "Get Related Users", {:url => { :action => 'get_related_users' }, 
          :update => 'result',:with=>"'someVal=3'"} %>

If I have to send one more key/value pair [someVal2=5], what will the :with look like?

+1  A: 

The docs say

A JavaScript expression specifying the parameters for the XMLHttpRequest. Any expressions should return a valid URL query string.

so I imagine that you would do something like

<%=button_to_remote "Get Related Users", {:url => { :action => 'get_related_users' }, 
          :update => 'result',:with=>"'someVal=3&someVal2=5'"} %>
Corey