I cannot figure out how to add a class to this select box in Rails 3.
<%= select(:item, :item_type, [['Phone', 1], ['Email', 2], ['Website', 3], ['Address', 4], ['Occupation', 5]]) %>
Is there anyone that knows how to do it?
Here's the official documentation for the select helper
<%= select(:item, :item_type, [['Phone', 1], ['Email', 2], ['Website', 3], ['Address', 4], ['Occupation', 5]], {}, :class => "myclass") %>
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