# Problems with observe\_form and parameters

**URL:** <https://www.ruby-forum.com/t/problems-with-observe-form-and-parameters/50185>\
**Category:** Rails\
**Created:** [November 25, 2005, 11:43am UTC](https://www.ruby-forum.com/t/problems-with-observe-form-and-parameters/50185 "2005-11-25T11:43:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gitte](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b19c9b/32.png) [@gitte](https://www.ruby-forum.com/u/gitte)\
**Post date:** [November 25, 2005, 11:43am UTC](https://www.ruby-forum.com/t/problems-with-observe-form-and-parameters/50185/1 "2005-11-25T11:43:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![gitte](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b19c9b/32.png) [@gitte](https://www.ruby-forum.com/u/gitte)\
**Post date:** [November 26, 2005, 6:47pm UTC](https://www.ruby-forum.com/t/problems-with-observe-form-and-parameters/50185/2 "2005-11-26T18:47:15Z")

</div>

I think you want Form.serialize

[http://wiki.rubyonrails.com/rails/pages/observe\_form+-+Passing+Parameters/](http://wiki.rubyonrails.com/rails/pages/observe_form+-+Passing+Parameters/)

-r

On 11/25/05, Gitte W. [removed\_email\_address@domain.invalid](mailto: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](http://lists.rubyonrails.org/mailman/listinfo/rails)

–  
Ryan R.  
[http://www.rockefeller.edu](http://www.rockefeller.edu) – Bacterial Pathogenesis and Immunology  
[http://www.worldmartial.com](http://www.worldmartial.com) – Black Belt Instructor  
[http://locomotive.sourceforge.net](http://locomotive.sourceforge.net) – Self contained one-click Rails for  
Mac OS X

---

<div class="post-metadata">

**Author:** ![gitte](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b19c9b/32.png) [@gitte](https://www.ruby-forum.com/u/gitte)\
**Post date:** [November 27, 2005, 10:11pm UTC](https://www.ruby-forum.com/t/problems-with-observe-form-and-parameters/50185/3 "2005-11-27T22:11:37Z")

</div>

Ryan R. wrote:

> I think you want Form.serialize
> 
> [Peak Obsession](http://wiki.rubyonrails.com/rails/pages/observe_form+-+Passing+Parameters/)
> 
> -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.
