Link_to with a couple of params

<%= link_to “Add to Watch list” , watchlists_path(:product_id => @id, :user_id => @current_user ), :method => :post %>

I thought this would work, but it’s not passing in the product id, just the user id…

I get the following error… param is missing or the value is empty: watchlist

This is strong_parameters telling you that you need to wrap the product_id inside a watchlist hash.

<%= link_to “Add to Watch list” , watchlists_path(watchlist: { product_id: @id, user_id: @current_user }), method: :post %>

That might do the trick.