So I don’t waste another 30 minutes of my life:
When using the select
helper in Merb, make sure you call to_s
on whatever you’re setting :selected
to, i.e.
select :name => "order[status]", :collection => OrderStatus.all,
:text_method => :description, :value_method => :id,
:selected => @order.status.to_s
Otherwise the helper will compare a String (the value) to an Integer (:selected
), and you’ll never get anything in your select selected!