small medium large xlarge

Tkn_pragsmall
16 Jan 2012, 13:50
Teddy K. Nielsen (3 posts)

Hi Jacob,

The problem lies in the way you pass the argument to the @line_items_path@. You should only use the => notation when you are dealing with hashes. The call to @button_to@ should look like this: @<%= button_to ‘Add to cart’, line_items_path(product_id: product) %>@

Regards, Teddy K.

Generic-user-small
18 Jan 2012, 04:49
Eric Rykwalder (6 posts)

You can also go with the old format: <%= button_to ‘Add to Cart’, line_items_path(:product_id => product) %>

You must be logged in to comment