I'm trying to do something like this.
select :model, :attribute, :style => "some:style;"
Add style
to the select helper
in rails, but it is not working.
From the documenation:
select(object, method, choices, options = {}, html_options = {})
So your :style
hash needs to be the 5th parameter. For example:
select(:model, :attribute, @options_for_select, { }, { :style => 'some: style' }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With