As my title explains, I have a select box in my form using Simple Form. All I'd like to do, is have it look like this bootstrap example under the selects section here: http://getbootstrap.com/css/#forms-controls
<%= f.input :category_id, label: 'Category: ' do %>
<%= f.select :category_id, Category.all.map { |c| [c.name, c.id] }, include_blank: true %>
As far as I can see I'd only have to add the 'form-control' class. But I can't figure out how to set the class.
Can anyone help?
<%= f.select :category_id, Category.all.map { |c| [c.name, c.id] }, include_blank: true, input_html: {class: 'form-control'} %>
The 'input_html' property is what you want to use.