I need to set an HTML class to select this rail and I have made several changes and nothing
& lt;% = add.select: state, @ states.map {| S | | [S.name, s.abbr]} ,: class = & gt; 'State',: include_blank = & gt; True% & gt;
I believe your html_options Code> options . Apart from this, since you are specifying two hashes for your previous two arguments, then tell you Ruby clearly that they are two different hashs. Try it:
& lt;% = add.select (: state, @ states.map {| s | [s.name, s.abbr]}, {: include_blank = & gt; ; True}, {: class => 'state'})%>
Comments
Post a Comment