I'm using simple_form
to submit a form with multiple fields and some dropdown values. When the form is rendered with errors, all text fields are remembered, but some of the dropdown values are resetted. All values are permitted in strong params, and pass validate_presence_of
validation.
The collections are created in my model using class methods. As follows:
def self.options
['One','Two','Three']
end
And loaded in my form using:
<%= f.input :dropdown, collection: MyModel.options, include_blank: false %>
What should I do correctly render the form object when it is returned with errors?