You apparently can’t combine include_blank
and required
on a select box, which seems odd.
by John Norris
I can imagine we’d often want to give users a choice of options (with no default) but insist they pick one.
It looks like this is possible, although you have to do a bit of a workaround by using prompt
on the select box, which adds a “no value” option, and then give that no display value, e.g.
<%= form.select :name, options_for_select(options), { prompt: "" }, required: true %>