nested_form icon indicating copy to clipboard operation
nested_form copied to clipboard

Problem with Add New Nested Field

Open sirius248 opened this issue 11 years ago • 3 comments

Click on Add then everything work. Click on save then it show 2 duplicate fields. I already remove TurboLink & checked for duplicate javascript require under application.js. But nothing works.

sirius248 avatar Oct 08 '14 08:10 sirius248

Do you have allow_destroy on your model's accept_nested_attributes_for? nested_form does work, it doesn't seem like an issue with it.

ramonsnir avatar Oct 08 '14 08:10 ramonsnir

I did have allow_destroy. But does not work at all. I'm thinking of another reason. Which might cause it save twice to the database.

I do before_filter in the controller, and there was only 1 field submitted (which is correct) but for some reason I save twice to the database. Not quite sure it's because of nested_form though

sirius248 avatar Oct 08 '14 09:10 sirius248