<%= f.select :ampm, {"am" => "am", "pm" => "pm"}, {:class => "form-control"} %>
と書くと生成されたhtmlにclass="form-control"
が反映されない。
<%= f.select :ampm, {"am" => "am", "pm" => "pm"}, {}, {:class => "form-control"} %>
タグ情報{"am" => "am", "pm" => "pm"}
の後に、{}
を入れてから、{:class => "form-control"}
を書く。