I want a result like this :
I believe they add the functionality in Rails 6.
From the pull request:
Enable select tag helper to mark prompt
option as selected
and/or disabled
for required
field. Example:
select :post,
:category,
["lifestyle", "programming", "spiritual"],
{ selected: "", disabled: "", prompt: "Choose one" },
{ required: true }
Placeholder option would be selected and disabled. The HTML produced: