I want to add class attribute to select tag in rails 3
my code is
<div >
<%= f.label :type %><br />
<%= f.select "type_id", options_from_collection_for_select(@type,
"type_id","name"),:include_blank=>true%>
</div>
My problem is that I want to add one specific class name to this select tag for validation purpose.
I tried adding
:class=>"myclassname"
but it not worked for me.plz resolve my issue
You can add class attribute like this. Check select