Started learning Ruby and RoR a couple of days ago and I’m working on a
I want to allow a user to save 5 records at the same time using a single
form. Let’s assume “contact” records, with each one consisting of a
“name” field. It’s a “user has_many contacts” relationship.
Anyone aware of tutorials/documentation on how to achieve this? I’m
a hard time modifying the code from a single record into multiple ones.
1- How to display 5 text fields in the form/correct form tag to use.
2- How to pass an array of those 5 objects to the “create” method (if
an array that I should pass)
3- How to create the instance variable that has the 5 objects in the
method so it’s available to the form