# Parameters for FormOptionsHelper select vs. FormTagHelper select\_tag

**URL:** <https://www.ruby-forum.com/t/parameters-for-formoptionshelper-select-vs-formtaghelper-select-tag/139120>\
**Category:** Rails\
**Created:** [May 31, 2008, 12:10am UTC](https://www.ruby-forum.com/t/parameters-for-formoptionshelper-select-vs-formtaghelper-select-tag/139120 "2008-05-31T00:10:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nik\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ee59a6/32.png) [@Nik\_B](https://www.ruby-forum.com/u/Nik_B)\
**Post date:** [May 31, 2008, 12:10am UTC](https://www.ruby-forum.com/t/parameters-for-formoptionshelper-select-vs-formtaghelper-select-tag/139120/1 "2008-05-31T00:10:49Z")

</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 “…”

Thanks,  
Nik

---

<div class="post-metadata">

**Author:** ![Nik\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/ee59a6/32.png) [@Nik\_B](https://www.ruby-forum.com/u/Nik_B)\
**Post date:** [May 31, 2008, 12:19am UTC](https://www.ruby-forum.com/t/parameters-for-formoptionshelper-select-vs-formtaghelper-select-tag/139120/2 "2008-05-31T00:19:35Z")

</div>

On May 30, 11:08 pm, Nik B [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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 … tags  
options\_for\_select & options\_from\_collection\_for\_select can produce  
these for you (the latter is closest in usage to select).

Fred
