# Forcing selected item in select

**URL:** <https://www.ruby-forum.com/t/forcing-selected-item-in-select/174486>\
**Category:** Rails\
**Created:** [August 27, 2009, 1:26pm UTC](https://www.ruby-forum.com/t/forcing-selected-item-in-select/174486 "2009-08-27T13:26:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RVince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/4491bb/32.png) [@RVince](https://www.ruby-forum.com/u/RVince)\
**Post date:** [August 27, 2009, 1:26pm UTC](https://www.ruby-forum.com/t/forcing-selected-item-in-select/174486/1 "2009-08-27T13:26:30Z")

</div>

How do I make sure item 0 is selected in:

\<%= select(“channelnotes”, “channelnotes”, Channelnote.find  
(:all, :order =\> ‘tstamp DESC’, :limit =\>3, :conditions =\>  
[“deleted=0”]).collect {|p| [p.note, p.note]}, { :include\_blank =\>  
true},{:onKeyDown =\> “fnKeyDownHandler(this, event);”, :onKeyUp =\>  
“fnKeyUpHandler\_A(this, event); return false;”, :onKeyPress =\> “return  
fnKeyPressHandler\_A(this, event);”, :onChange =\> “fnChangeHandler\_A  
(this, event);”, :style =\> “width:350px;”,:id=\> “channelnotes”}) %\>

Thanks, RVince
