I want to use form_for to allow a user to submit a form that contains two
instances of the same model. They are entering calendar dates and I want
them to be able to submit 2 from the same form.
Ok, so, using form_for, what is the best way to do this? form_for seems to
be setup to handle a single instance in that it wants a name for the
Has someone else done this? Any quick pointers?
Beyond that, a related question. Some of these helpers support the :index
option which I believe is designed to differentiate between multiple items
of the same type in a form.
Something like this:
<%= form.text_field :event_city, :index => @event_date.id %>
But, for an unsaved item, @event_date.id will be nil so what do folks use to
Any help very much appreciated.