I am using the "link_to_add_fields" helper as used in this screencast in my "Order" model, in the order form you can "add row". It all works ok. But when editing an order, example: /order/1/edit", if the form had 5 rows, when I save the edits it saves the form with 10 rows, if form has 3 rows it saves it with 6 etc. Anybody else run into this issue?
Ah came across the cause, needed to add the order rows :id to my permitted parameters. All good now.
http://stackoverflow.com/questions/18946479/ror-nested-attributes-produces-duplicates-when-edit
I am using the "link_to_add_fields" helper as used in this screencast in my "Order" model, in the order form you can "add row". It all works ok. But when editing an order, example: /order/1/edit", if the form had 5 rows, when I save the edits it saves the form with 10 rows, if form has 3 rows it saves it with 6 etc. Anybody else run into this issue?