# Select box's

**URL:** <https://www.ruby-forum.com/t/select-boxs/96095>\
**Category:** Rails\
**Created:** [June 25, 2006, 11:06pm UTC](https://www.ruby-forum.com/t/select-boxs/96095 "2006-06-25T23:06:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [June 25, 2006, 11:06pm UTC](https://www.ruby-forum.com/t/select-boxs/96095/1 "2006-06-25T23:06:22Z")

</div>

Hi,

I have this code for a select box,

\<%= select(“plugin”, “plugcats”, Plugcats.find\_all.collect {|p| [  
p.title, p.id ] }, { :include\_blank =\> true }) %\>

at the minute it extracts teh requried data, but submits the data as  
params[‘plugin’][‘plugcats’]

how can I get it to submit it as [‘plugin’][‘plugcat\_id’]

thanks

---

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [June 26, 2006, 1:41am UTC](https://www.ruby-forum.com/t/select-boxs/96095/2 "2006-06-26T01:41:11Z")

</div>

> how can I get it to submit it as [‘plugin’][‘plugcat\_id’]
> 
> thanks

have you tried?  
\<%= select(“plugin”, “plugcat\_id”, Plugcats.find\_all.collect {|p| [  
p.title, p.id ] }, { :include\_blank =\> true }) %\>

---

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [June 26, 2006, 10:11am UTC](https://www.ruby-forum.com/t/select-boxs/96095/3 "2006-06-26T10:11:57Z")

</div>

Ricardo C. wrote:

> > how can I get it to submit it as [‘plugin’][‘plugcat\_id’]
> > 
> > thanks
> 
> have you tried?  
> \<%= select(“plugin”, “plugcat\_id”, Plugcats.find\_all.collect {|p| [  
> p.title, p.id ] }, { :include\_blank =\> true }) %\>

yeah, it just says undefined method

---

<div class="post-metadata">

**Author:** ![scott](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://www.ruby-forum.com/u/scott)\
**Post date:** [June 26, 2006, 12:56pm UTC](https://www.ruby-forum.com/t/select-boxs/96095/4 "2006-06-26T12:56:16Z")

</div>

ss wrote:

> Ricardo C. wrote:
> 
> > > how can I get it to submit it as [‘plugin’][‘plugcat\_id’]
> > > 
> > > thanks
> > 
> > have you tried?  
> > \<%= select(“plugin”, “plugcat\_id”, Plugcats.find\_all.collect {|p| [  
> > p.title, p.id ] }, { :include\_blank =\> true }) %\>
> 
> yeah, it just says undefined method

shouldn’t Plugcats should be Plugcat?
