Skip to content

Instantly share code, notes, and snippets.

@philcrissman
Created October 9, 2010 21:30
Show Gist options
  • Save philcrissman/618616 to your computer and use it in GitHub Desktop.
Save philcrissman/618616 to your computer and use it in GitHub Desktop.
# this works fine, sends an xhr to the url that I want it to.
# but I want to send some params. Where to put them? :-\
=link_to "up", votes_path, :method => :post, :remote => true
@philcrissman
Copy link
Author

thought I tried this already, but this does the trick:

=link_to "up", votes_path(:vote => {:value => '1'}), :method => :post, :remote => true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment