Ruby on Rails Friday, February 3, 2017

I have the following code in my show.html.erb file, it calls the right method (or path).  
I am unsure how to pass variables from my product show.html.etb to my actual method... 

<%= button_to 'Add to Cart', add_to_cart_path, method: :post %>

I need to pass the product id, and possibly qty.


You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment