我正在使用Rails 5和bootstrap_form_for来构建表单。添加类以在Rails 5中选择字段with bootstrap_form_for
我知道有在于是一些类似的问题,但没有一个帮我解决我的问题...
我想自定义类添加到选择字段。但我的是这样的:
<%= f.collection_select :location_id, Location.all, :id, :name, :include_blank => ("Insere um endereço ou escolha um local da lista..."), hide_label: true, :class => 'location' %>
但该类不适用。我可以做什么不同?
尝试'<%= f.collection_select:LOCATION_ID,Location.all,:ID,:名称,{},{类: “位置”}%>' –