Reputation: 149
I'm new to rails and I'm pretty confused on where to put my class:'custom-select'
for a select option.
<%= form.select(:category_id, options_for_select(@categories)) %>
Where does it go?
Thank you ahead of time.
Upvotes: 0
Views: 73
Reputation: 796
The HTML hash is the fourth argument in the select tag helper method.
<%= form.select(:category_id, options_for_select(@categories), {}, class: 'custom-select') %>
Upvotes: 2