0
Мне нужно установить ширину по умолчанию для collection_select в Rails. Я попытался это, но он не работает:установка ширины по умолчанию для collection_select в Rails
<%= u.collection_select :program_id, Program.where(:status => true), :id, :name , :include_blank=> true, :class=>'foo'%>
я также попробовал:
<%= u.collection_select :program_id, Program.where(:status => true), :id, :name , :include_blank=> true, {:class=>'foo'}%>
<%= u.collection_select :program_id, Program.where(:status => true), :id, :name , :include_blank=> true, :style=>'width:50%'%>
и они не работали, какие-либо идеи ??
Как выглядел ваш класс '' foo'' в файле CSS? – ScottJShea
@ScottJShea класс может выглядеть так: '.foo { width: 23px; } ' – Daisy