It\'s my code:
<%= f.select :area, options_for_select([[\'a\',\'a\'],[\'b\',\'b\'],[\'c\',\'c\']]), {}, {:class => \'span3 controls controls-row\'}, :selec
No need to use :selected
just pass your params[:area]
alone to options_for_select as a second argument:
<%= f.select :area,
options_for_select([['a','a'],['b','b'],['c','c']], params[:area]),
{}, { :class => 'span3 controls controls-row' } %>
The last value of your params[:area]
will be selected.
Hope it helps ; )