Flowdock

Notes posted by andredurao

RSS feed
August 26, 2009 - (v1.0.0 - v2.3.2)
1 thank

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} %>