<%= f.label "SELECT MODEL LOCATION *" %><br />
<div class="list_number">1</div><%= f.collection_select :location_id, Location.all, :id, :name, prompt: true, :required => true, :class => 'chosen-select' %>
<%= f.label "SELECT YOUR MODEL *" %><br />
<div class="list_number">2</div>
<%= f.grouped_collection_select :performer_id, Location.order(:name), :performers, :name, :id, :first_name, include_blank: true, :required => true, class: 'chosen-select' %>
<%= f.label "SELECT YOUR CATEGORY *" %><br />
<div class="list_number">3</div>
<%= f.select :clip_category_id, grouped_options_for_select(Performer.order(:first_name).map{ |group| [group.first_name, group.clip_category_performers.map{ |c| [c.clip_category.name, c.clip_category.id, {'data-amount'=>c.amount}] } ] }), include_blank: true, required: true, class: 'chosen-select' %>
I have used this collection select and as you see I have used chosen select Jquery plugin using chosen-rails gem. I am not able to make collection-select work. I am not able to set class for the collection select even though I have given here in the code when I inspect using inspect element in browser it won't show any class. What am I doing wrong?