Select form tag (selected option)

Hello,

I’m having problems with form select tag (it wont select the expected
value on edit action):

<% form_for @review do |f| %>

<%= f.label :customer_service_rating %>
<%= f.select :customer_service_rating, options_for_select(1..5), { :include_blank => true } %>

<% end %>

review model has a customer_service_rating column which is an integer.
If I set this value to some number betwen 1-5 it wont select it on edit.

What am I doing wrong here?

Thanks for help!

This wont work either:

<%=
f.select :customer_service_rating, options_for_select(1…5), {
:selected => 2 }
%>

Use:

<%= f.select(:customer_service_rating, (1…5).to_a) %>

Or, more completely:

<%= f.select(:customer_service_rating, (1…5).to_a,
{ :include_blank => true, :selected => 2 } ) %>