Hello, There has to be a more efficient way in Rails of doing this:
<p>
<%= f.label :level %>
<%= f.radio_button :level, "0" %> <%= f.label :level, 0 %>
<%= f.radio_button :level, "1" %> <%= f.label :level, 1 %>
<%= f.radio_button :level, "2" %> <%= f.label :level, 2 %>
<%= f.radio_button :level, "3" %> <%= f.label :level, 3 %>
<%= f.radio_button :level, "4" %> <%= f.label :level, 4 %>
<%= f.radio_button :level, "5" %> <%= f.label :level, 5 %>
</p>
The db has a column "level" that can have values from 0-5. I need the current value to be displayed in HTML (ie checked="checked") as this code does. There has to be a more succinct way in Rails of doing this. Any takers?