我要添加类属性来选择轨道3标签 我的代码是如何添加类属性在轨选择标签3
<div >
<%= f.label :type %><br />
<%= f.select "type_id", options_from_collection_for_select(@type,
"type_id","name"),:include_blank=>true%>
</div>
我的问题是,我想一个特定的类名称添加到这个选择标签用于验证目的。 我尝试添加
:class=>"myclassname"
,但它不工作了me.plz解决我的问题
的可能重复的[on Rails的形式\红宝石_for与类选择字段(http://stackoverflow.com/questions/4081907/ruby-on-rails-form-for-select-field- – fivedigit 2014-09-16 10:51:45