Just to clarify @M Tariq Aziz's answer:
Your code should look like this:
@yrs =[2011,2010,2009,2008] <%= select_tag 'year', options_for_select([["Select" , "" ]] + @yrs.to_a,2011) %>
The general format for the selected tag:
<%= select_tag 'year', options_for_select(:collection, :selected) %>
harrya Mar 22 '12 at 16:34 2012-03-22 16:34
source share