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

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -