Topic: Returning a Multiple select
Hello. I'm just having a moment when I can't think of what I need.
I have a multiple select which I select usually between 2 and 6 different values. How do I retrieve which values are selected?
The code I have below returns the highest id of the selected crew members. What I want is to get back either an array of crewmembers, or an array of the crewmembers' ids or something useable like that.
Thanks for any help - I'm still new at Ruby...
Hold Control to Select multiple members<br/>
<SELECT NAME="crew" MULTIPLE SIZE=5>
<% @crewmembers.each do |crewmember| %>
<%= crewmember.lastname %>, <%= crewmember.firstname %>
<% end %>
@job = Job.new(@params['job'])
redirect_to :action => 'list'
edit: Made for pretty printing in the code
Last edited by Caydel (2006-07-12 08:22:49)