Created
April 27, 2012 03:17
-
-
Save joncode/2505387 to your computer and use it in GitHub Desktop.
adding params to link_to
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using link_to via AJAX to update quantities on a form ... here is the code that passes the new quantity amount ... | |
<%= link_to ' ^ ', line_item_path(line_item, :amount => 1), | |
method: :put, | |
remote: true %> | |
NOTE - this will NOT work without the object (line_item) in the parenths with the :amount |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment