ruby on rails - add class to collection_select -
i've looked @ how set html options collection_select in rails? , i'm sure i'm missing obvious, can't work.
my select looks like:
<%= f.collection_select :broadcast_id, broadcasts, :id, :to_s, :include_blank => 'broadcast on...' %>
and i've tried including :class => 'prevent_collapse', nothing, {:class => 'prevent_collapse'}, gives me error.
if can point out how this, i'll super grateful!
collection_select(object, method, collection, value_method, text_method, options = {}, html_options = {}) => f.collection_select :broadcast_id, broadcasts, :id, :to_s, {:include_blank => 'broadcast on...'}, {:class => 'prevent_collapse'}
and error have?
and broadcast item has got :to_s
method? return class name, think.
Comments
Post a Comment