Forum: Ruby on Rails How to send multiple values to controller using :with option of collection_select

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Shripad (Guest)
on 2009-03-19 09:36
(Received via mailing list)
Hi,

Thank u all for replying my previous posts.

I have following problem

I want to send multiple selected values from collection_select using
":with" option to a controller without submitting the form, i have
following code

<%= collection_select(:cluster, :CLST_RegionID,
regions,  :id, :REG_RegionName,
                      {:prompt   => "Please Select"},
                      {:onchange => "#{remote_function(:url  =>
{:action => "update_clusters"},
                                                       :with =>
"'id='+value")}"}) %>


this works fine for single value,
when I write ":multiple => true" it is not allowing me to pass
multiple values.

what should I change in the above code to passing multiple values to
controller?

Please help me out,


Thanks,
Shripad
This topic is locked and can not be replied to.