私はこのシンプルなフォームを持っています。私はCSSでドロップダウンメニューのスタイルを設定したいと考えています。Simple FormをカスタマイズするCollection_Select
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 %>