# Select helper is a mess

**URL:** <https://www.ruby-forum.com/t/select-helper-is-a-mess/89969>\
**Category:** Rails\
**Created:** [March 24, 2007, 9:41am UTC](https://www.ruby-forum.com/t/select-helper-is-a-mess/89969 "2007-03-24T09:41:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [March 24, 2007, 9:41am UTC](https://www.ruby-forum.com/t/select-helper-is-a-mess/89969/1 "2007-03-24T09:41:29Z")

</div>

I am using a select helper in my partial view, as stated in the API doc

\<%= select ‘distance’, ‘radius’, [[“2 km” ,2], [“5 km”, 5], [“10 km” ,  
10], [“15 km”, 15], [“25 kilomÃ¨tres”, 25] ], {:selected =\> 10}, {:style  
=\> ‘width:90%;’} %\>

the generated html is right :

 2 km 5 km 10 km 15 km 25 km 

but the selected item in the dropdown remains always the first… (2 km)

what’s wrong ?

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [March 24, 2007, 10:39am UTC](https://www.ruby-forum.com/t/select-helper-is-a-mess/89969/2 "2007-03-24T10:39:37Z")

</div>

Kad K. schrieb:

> I am using a select helper in my partial view, as stated in the API doc  
> […]
> 
> but the selected item in the dropdown remains always the first… (2 km)
> 
> what’s wrong ?

> **[Selected attribute for select control doesn't work in Firefox - Javascript](https://bytes.com/topic/javascript/answers/521870-selected-attribute-select-control-doesnt-work-firefox)**
>
> Selected attribute for select control doesn't work in Firefox. Javascript Forums on Bytes.

hth

best regards,  
Roland
