collection_select problem

Added by Ibtissem Fakhfakh almost 10 years ago

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" >
@types.each do |untype| >
= untype[:alertetype] >
= collection_select(:tracker, :id, @trackers, :id, :name, options ={:prompt => "choisir un tracker"}) >
end %>


<%= 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.

Replies (1)

RE: collection_select problem - Added by Evgeny Tsirkin almost 10 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?