nested_form
nested_form copied to clipboard
double nested form
I'm trying to create two nested forms for the same relation but with different forms but when I click on the 'add' button on the form A, it creates a line like line B
have you fixed that?
Might be related to this one ? https://github.com/ryanb/nested_form/issues/288
any sugestion?
Try to specify data target :
<%= f.link_to_add 'add new', :your_association, :data => { :target => "#your_association-#{f.index}"}
And don't forget to wrap your fields inside a tag with the .fields
class
(You might want to have a look at https://github.com/ryanb/nested_form/issues/343)
Thanks friend!