I'm unable to figure out how to submit specific data to a Rails update() method via the jQuery submit() method. This is the code snippet I'm working with:
<% form_for(vote, :remote => true) do |f| %> <%= check_box_tag "selection", vote.id %> <% end %>
...
<%= link_to 'Vote Yes', ballots_path, :onclick => "$('.edit_vote').submit()" %> <%= link_to 'Vote No', ballots_path, :onclick => "$('.edit_vote').submit()" %>
How do I use the jQuery submit method to submit specific data to the Vote controller update method? (for example if I press "Vote Yes" then it submits ":approval => true" so that I can use params[:approval] to update the particular vote)
Am I even on the right track?