# Parameters for FormOptionsHelper select vs. FormTagHelper select\_tag

**URL:** <https://discuss.rubyonrails.org/t/parameters-for-formoptionshelper-select-vs-formtaghelper-select-tag/30029>\
**Category:** rubyonrails-talk\
**Created:** [May 30, 2008, 10:08pm UTC](https://discuss.rubyonrails.org/t/parameters-for-formoptionshelper-select-vs-formtaghelper-select-tag/30029 "2008-05-30T22:08:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nik\_B](https://avatars.discourse-cdn.com/v4/letter/n/ee59a6/32.png) [@Nik\_B](https://discuss.rubyonrails.org/u/Nik_B)\
**Post date:** [May 30, 2008, 10:08pm UTC](https://discuss.rubyonrails.org/t/parameters-for-formoptionshelper-select-vs-formtaghelper-select-tag/30029/1 "2008-05-30T22:08:57Z")

</div>

I must be missing something when it comes to the parameter differences between form FormOptionsHelper select and FormTagHelper select\_tag.

Code that follows, works perfectly -

\<%= f.select :unit, units\_to\_select(@product), :size=\>"20"%\>

The following code, does not. The helper function never even seems to be called.

\<%= select\_tag "unit", units\_to\_select(@product) %\>

Why would this be the case? The only way I can seem to populate the select\_tag is to hardcode with "\<option\>..."

Thanks, Nik

---

<div class="post-metadata">

**Author:** ![Frederick\_Cheung](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/frederick_cheung/32/3901_2.png) [@Frederick\_Cheung](https://discuss.rubyonrails.org/u/Frederick_Cheung)\
**Post date:** [May 30, 2008, 10:18pm UTC](https://discuss.rubyonrails.org/t/parameters-for-formoptionshelper-select-vs-formtaghelper-select-tag/30029/2 "2008-05-30T22:18:14Z")

</div>

> I must be missing something when it comes to the parameter differences between form FormOptionsHelper select and FormTagHelper select\_tag.
> 
> Code that follows, works perfectly -
> 
> \<%= f.select :unit, units\_to\_select(@product), :size=\>"20"%\>

select expects an array of options (which can be in a variety of formats

> The following code, does not. The helper function never even seems to be called.
> 
> \<%= select\_tag "unit", units\_to\_select(@product) %\>

select\_tag expects the actual html \<option\>... tags options\_for\_select & options\_from\_collection\_for\_select can produce these for you (the latter is closest in usage to select).

Fred
