I have a pretty typical controller with a new action. It looks like this:
def new
@child = Child.new
end
The form fields in my view is also fairly simple. They looks like:
<%= form.text_field :name, placeholder: "John" %>
<%= form.text_field :birthday, placeholder: "MM/DD/YYYY" %>
I'd like my view to submit multiple children in this form. I'll have javascript create them dynamically.
How do I deal with this in the new and action in my controller? And how do I deal with this in my view?
It seems like must be a way to submit an array of children. I feel confident that I can deal with the array in a create controller action, but I'm not sure where to start here.