I\'ve created a form
<%= form_for [current_user,@product,@bid] do |f| %> <%= f.number_field :bid_amount %> <%= f.n
<%= f.number_field :bid_amount %>
<%= f.n
Just add @product.id to your field.
In this example <%= f.number_field :product_id, @product.id %>