Problem with Add New Nested Field
sirius248 opened this issue · 2 comments
sirius248 commented
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.
ramonsnir commented
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.
sirius248 commented
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