I am trying to figure out the new link_to
in Rails 3
but i still don't get it
In Rails 2 I do:
<%= link_to_remote "My Link",:url=>{:action=>:myaction},:with=>"'data='+$('#someField').attr('value')" %>
but with the new syntax in Rails 3 how should it be?
I'm trying something like
<%=link_to "My Link",{:action=>"myaction"},:with=>"'data='+$('#someField').attr('value');",:remote=>true%>
but I'm not getting the quantity params in the controller's action
Something like this will send a "data" parameter with the value = 10.
link_to "My Link", { :controller => 'myctrler', :action=>"myact", :data=> 10 }, :remote=>true
I've never seen/used the :with option before. I'm sorry I can't help on that one.