Last Updated: February 25, 2016
·
12.67K
· cassioscabral

Select Tag with class in Rails

If you wish to give your select field a class, it is necessary to give the second argument, even when empty.

<%= f.select(:gender, [ 'Male', 'Female' ], {}, { :class => 'select' }) %>