I’m close to getting this to work, but not quite there. I’m trying to
implement a dropdown control, with the current choice selected.
I have the following code in the view:
5 <select id="product_product_type" name="product[product_type]">
6 <%=
7 types = ProductType.find(:all, :order => "product_type")
8 options_from_collection_for_select( types, :id, :product_type,
selected=@product_type_id)
9 %>
10 </select
Which renders the following:
Product type
However, in the browser the “Supplies” item isn’t displaed on load, but
the blank first option is. Anyone see what I’m doing wrong?