Co usar date_select



I have a problem with dateHelper date_select. I think this is a bug.

In a form, I’ve to list many objects of type “formacio” that a “persona”

“formacio” object have an “id”, two foreing key “centre_id” and
“titulacio_id” and a “finalitza_on” date.

The form have to be used to update attributes of all “formacions” of a

In a form I have this code:

<% @persona.formacions.each do |@formacio| %>

<%= select("formacio[]","titulacio_id", @titulacions ,{:include_blank => true }) %> <%= select("formacio[]","centre_id", @centres ,{:include_blank => true }) %> <%= date_select("formacio[]", "finalitza_on" ) %>
<%= link_to "Borrar",{ :action => "borrar_formacio", :id => @persona, :f_id => @formacio } %> <% end %>

Whell, the indexation with [] go pretty well with “titulacio_id” and
“centre_id” but not with “finalitza_on”.

The params generated for two objects “formacio” with ids “25” and “26”

Parameters: {“formacio”=>{
“25”=>{“centre_id”=>"", “titulacio_id”=>“2”},
“26”=>{“centre_id”=>"", “titulacio_id”=>“3”},

But what I need is:

Parameters: {“formacio”=>{
“25”=>{ “centre_id”=>"",
“26”=>{ “centre_id”=>"",

More information about my system:

$ ruby -v
ruby 1.8.4 (2005-10-29) [i486-linux]

$ dpkg -l rails
ii rails 0.14.3-1 MVC ruby based framework

I’m using mysql on a Debian GNU/linux

$ mysql -V
mysql Ver 14.7 Distrib 4.1.15, for pc-linux-gnu (i486) using readline

What’s going wrong?