Hello,
I have the following in my view to display a select box with countries in it:
@countries = {'United States' => 'US', 'France' => 'FR'}
<%= select_tag 'countries',
options_for_select(@countries.to_a) %>
it works fine. Now in cases I have an error after submitting the form, all of the values in the text field that have been previously entered are shown again (so no need to re-enter them), but the select box is reset to its default value.
Any ideas what parameter should I include so when an error occurs a the value from the select box stays.