Maybe somebody can point me in the right direction on this one. One
field in my model is a person’s height in inches. The form has the
following code to let the user enter his/her height:
<%= text_field ‘condition’, ‘height’ %> inches
I want to change this into two drop down lists. One for height in feet
and the other for height in inches. I would prefer two drop downlists
one for height in feet and the other for the inches. Something that I
could implement as:
<%= select_height ‘condition’, ‘height’ %>
I think I can figure out the HTML generation part, but what I’m
confused about is how to set it up where when the form is submitted
that the height field is automatically populated via the standard:
@condition = Condition.new(params[:condition])