Forum: Ruby on Rails Problems with observe_form and parameters

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.
gitte (Guest)
on 2005-11-25 12:43
(Received via mailing list)
Hi!

I'm having some problems with observe_form and several multiple selects.
My form contains 5 multiple selects and I would like to send the
selected values from each of them to my controller.
Usually you would create a string of the values in the :with parameter,
but it would be quite ugly to make a oneliner looping through select
boxes to find selected indexes.

How does people usually solve this?
I tried making a function that returns a string of parameters, but I
just got bogus calling it from :with.

Greetings,
Gitte W.
ryan.raaum (Guest)
on 2005-11-26 19:47
(Received via mailing list)
I think you want Form.serialize

http://wiki.rubyonrails.com/rails/pages/observe_fo...

-r

On 11/25/05, Gitte W. <removed_email_address@domain.invalid> wrote:
> I tried making a function that returns a string of parameters, but I
> just got bogus calling it from :with.
>
> Greetings,
> Gitte W.
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Ryan R.
http://www.rockefeller.edu -- Bacterial Pathogenesis and Immunology
http://www.worldmartial.com -- Black Belt Instructor
http://locomotive.sourceforge.net -- Self contained one-click Rails for
Mac OS X
gitte (Guest)
on 2005-11-27 23:11
(Received via mailing list)
Ryan R. wrote:
> I think you want Form.serialize
>
> http://wiki.rubyonrails.com/rails/pages/observe_fo...
>
> -r

Thanks !
It really helped and everything is working totally cool!
Maybe the info needs to be worked into the rdoc documentation.

Greetings,
Gitte W.
This topic is locked and can not be replied to.