How to submit multiple NEW items via Rails 3.2 mass-assignment

前端 未结 8 1487
醉梦人生
醉梦人生 2020-12-04 06:33

I have a pretty standard use-case. I have a parent object and a list of child objects. I want to have a tabular form where I can edit all the children at once, as rows in th

8条回答
  •  醉梦人生
    2020-12-04 07:13

    long post deleted

    Ryan has an episode on this: http://railscasts.com/episodes/196-nested-model-form-revised

    It looks like you need to generate the unique index manually. Ryan uses the object_id for this.

提交回复
热议问题