collection_select problem

Added by Ibtissem Fakhfakh over 9 years ago

hi,
i'am novice at ruby on Rails framework. i'am trying to add a plugin for Redmin wich is a Rails application.
My problem:
i have this code in my html.erb file:
<%= form_tag :action => "sauver" >
<table>
<
@types.each do |untype| >
<tr>
<td>
<
= untype[:alertetype] >
</td>
<td>
<
= collection_select(:tracker, :id, @trackers, :id, :name, options ={:prompt => "choisir un tracker"}) >
</td>
</tr>
<
end %>

</table>

<%= submit_tag "valider" %>

i need to recover all values selected. When i use "params[:tracker][:id]" i have just one value posted.
Could you help me please.
Thank you in advance.
Cordially

Replies (1)

RE: collection_select problem - Added by Evgeny Tsirkin over 9 years ago

Well, since you are using a <select> tag (collection_select) you are
going to have only one value selected ,isn't it obvious?

(1-1/1)