I’m using the following in a form_for, in order to display and edit
two activity_details in the same form as an activity.
<% fields_for "activity_detail", @delivery do |detail| %> ... <%= detail.text_field 'start_mileage' %> ... <% end %> <% fields_for "activity_detail", @pickup do |detail| %> ... <%= detail.text_field 'end_mileage' %> ... <% end %>
It works like a charm. However, I’d now like to use Stuart R.'s
date kit helper to format and select some dates for each activity
e.g. <%= date_field(‘person’, ‘birthday’, :value => @person.birthday)
My question is this: What arguments do I pass for this style (non-
member) of form helper in the context of an array of models in a
fields_for, as above?
Page 490 of AWDWR 2nd ed. gives a clue that it should be possible.
Their (very simple case) example goes like this:
<% form_for :user do |form| %>
Name: <%= text_field :user, :name %>