When using the select form builder method in rails, for instance:
f.select
In conjunction with the options_from_collection_for_select method, like
f.select :field, options_from_collection_for_select(@fields, ‘id’, ‘name’)
Remember, there is a fourth argument in the above method, which defines the selected value, like so
f.select :field, options_from_collection_for_select(@fields, ‘id’, ‘name’, @object.field)
Thank you very much!