According to this answer on SO. form elements may not be nested. What I did was have a form for a model that had images, I in turn then nested the images in form tags so that they can easily be deleted seperately from their "parent" model using the jQuery Ajax form plugin. The problem as I found out is that you cannot do this, so I am looking for an easy workaround that lets me use the form helper or something similar (so that I get the anti-csrf tag etc. etc) and can delete with ajax.
Asked
Active
Viewed 51 times
1 Answers
1
You're looking for the old accepts_nested_attributes
+ fields_for :child_item
pairing, allows you to have a parent object with many child items in their own little forms within the main form.

Matt
- 13,948
- 6
- 44
- 68