Hello,
I wanted to ask you if you could point me in the right direction on how to do something that I’ve been banging my head against for a couple of days now. I have a table user which links with a has_many relationship to a table sibling that contains two fields name and surname. If I were to create a form that lets you add siblings and for each new sibling add the name and surname, how would you suggest I go on about doing it? What I mean is how can I add a “add” button to the user form that lets me add a new sibling every time i press it?
as of now I made the form multipart and added the inputs_for f, :siblings p nested form which lets me add a sibling per user.
I then followed an article from AlchemistCamp to make the form dynamic and added the add and remove buttton with relative js. problem is the article i followed is imprinted on adding only one field to fill an array structure rather than a separate model, so I was wondering if anybody had ever done that and could point me in the right direction.
Thank you very much






















