I have:
form.input :duration, as: select, collection: {}
I need:
Actually rails does support adding any kind of html tag to options. Usually you would have:
options_for_select( [['First', 1], ['Second', 2]] )
which would give you
If you add a hash into the arrays for each option the hash keys/values will be added as HTML attribute to the option, e.g.
options_for_select( [['First', 1, {:'data-price' => 20}],
['Second', 2, {:'data-price' => 30}]] )
will produce the required tags: