Hi All,
I am wondering if it is possible to have date_select fields that are
indexed for updating of multiple rows.
Here is my code:
<% @book.awards.each do |@award| %>
<tr>
<td><%= select("award[]", "category", [
"Fiction", "Non-Fiction",
"Poetry", "First-Boak", "Translation" ],
{ :include_blank => false }) %></td>
<td><%= date_select("award[]", "year", :start_year
=>
2007, :end_year => 1980,
:discard_month => true, :include_blank => false) %></td>
</tr>
<% end %>
This outputs:
<tr>
<td><select id="award_9_category"
name="award[9][category]"><option
value="Fiction">Fiction</option>
<option value="Non-Fiction">Non-Fiction</option>
<option
value="Translation">Translation</option></select></td>
<td><select name="award[year(1i)]">...
Does anyone know why the name of the first select field has an index
but the name of the date select field doesn''t? Is there some way
around this? I tried directly passing the helper the id for the index
but that produced errors.
Thanks,
Sean