Hi. I have an app that has prodcts, which have many details.
I'm writing a view that allows the user to update the product info and
also info on each details record (number remaining in inventory, etc).
The form displays fine and populates w/ the detail records, and it
updates the product record. But it does not alter the detail record at
Here's the controller...
@product = Product.find(params[:id], :order=>'gender, size',
@product = product.find(params[:id])
flash[:notice] = 'product was successfully updated.'
redirect_to :action => 'show', :id => @product
render :action => 'edit'
And a snippet of the view
<% for @detail in @product.details %>
<td><%= text_field ("detail", "remaining") %></td>
<% end %>