Notes posted by andredurao
RSS feed
2 thanks
sending an array of multiple options
To make sure that you’ll receive a array you should declare the name of the select with “[ ]” like that:
Example
<%= select_tag "users[]", options_for_select(@users.collect{|x| [x.name,x.id]}), {:multiple => :multiple, :size => 10} %>