# Using Select Helper

**URL:** <https://www.ruby-forum.com/t/using-select-helper/173136>\
**Category:** Rails\
**Created:** [August 3, 2009, 8:26pm UTC](https://www.ruby-forum.com/t/using-select-helper/173136 "2009-08-03T20:26:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![diabolist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c2a13f/32.png) [@diabolist](https://www.ruby-forum.com/u/diabolist)\
**Post date:** [August 3, 2009, 8:26pm UTC](https://www.ruby-forum.com/t/using-select-helper/173136/1 "2009-08-03T20:26:44Z")

</div>

I am having trouble getting the form select helper to use non-numeric  
values.

The form is pasted below… I want the f.select to have values  
“home”, “category”, etc, not numeric values like shown. However, it  
does not seem to work to use [“Home Page”, ‘home’].

From what I can find in the guides, all the examples use numeric  
values.

Any ideas?

Thanks,

Andrew P.

* * *

\<% form\_for(@product) do |f| %\>  
\<%= f.error\_messages %\>

\<%= f.label :name %\>  
 \<%= f.text\_field :name %\>

\<%= f.label :description %\>  
 \<%= f.text\_area :description %\>

\<%= f.label :specs %\>  
 \<%= f.text\_area :specs %\>

\<%= f.label :price %\>  
 \<%= f.text\_field :price %\>

\<%= f.label :location %\>  
 \<%= f.select(:location, options\_for\_select([['-Select-', ''], ['Home Page', 1], ['Manufacturer Page', 2], ['Category Page', 3], ['Product Page Only', 4]], @product.location)) %\>

\<%= f.label :tag\_id %\> \<%= f.collection\_select :tag\_ids, Tag.find(:all, :order =\> 'name'), :id, :name, {}, :multiple =\> true %\>

\<%= f.submit button\_label %\>

\<% end %\>

---

<div class="post-metadata">

**Author:** ![diabolist](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c2a13f/32.png) [@diabolist](https://www.ruby-forum.com/u/diabolist)\
**Post date:** [August 3, 2009, 8:36pm UTC](https://www.ruby-forum.com/t/using-select-helper/173136/2 "2009-08-03T20:36:41Z")

</div>

Please ignore. It was a problem with my migration file.

Thanks
