0
我已经有了这个简单的表单,我希望能够使用CSS来设置下拉菜单的样式。自定义简单表单集合_选择
input_html: { class: "form-dropdown" }
不改变风格。我如何能够正确添加一个类到简单的表格collection_select
以在CSS中设置样式,还是有其他方式可以设置下拉菜单的样式?
这是我的简单形式:
<%= simple_form_for @document do |f| %>
<%= f.collection_select :category_id, Category.all, :id, :name, {promt: "Choose a category" }, input_html: { class: "form-dropdown" } %>
<%= f.input :title, label: "Title", label_html: { class: 'form-input' } %>
<%= f.input :pdf, label: "Upload document:" %>
<%= f.button :submit %>
<% end %>