How to add the html class name to select box in rails
I have tried following methods but getting syntax error
<%= f.collection_select :product, @product, :id, :name, selected: @post.product.id, html_options={class: 'tst'} %>
<%= f.collection_select :product, @product, :id, :name, selected: @post.product.id,{class: 'tst'} %>
<%= f.collection_select :product, @product, :id, :name, selected: @post.product.id, html_options: {class: 'tst'} %>
Tried all the above three ways but I am unable to fix it how can i add a html class in it.