i would like to display a collection of records on one page (e.g. an
author record with all his/her books).
a record contains a text_area (e.g. a description of the book) and a
date_select (e.g. when the book was published).
<% for @book in @author.books %>
<%= text_area ‘book’, ‘note’ %>
<%= datetime_select ‘book’, ‘published_on’ %>
<% end %>
the text_field works nice, the generated code looks like:
the ID of a book record is there. BUT i do not know, how to achieve this with the date_select helper? the helper generates:
it should be name="book[published_on(2i)]" how to do that? (:prefix, :discard_type did not work for me) thanks ondrej