Using a CSS id with f.select in html.slim -


i'm baffled trying figure out how put css id f.select, using html.slim template (i loathe .slim, unfortunately, working on else's project). here have:

= f.select(:state, options_for_select(us_states, @user.state), id: "state-dropdown") 

i have tried moving parenthesis around , every other combination can think of, doesn't work. code above load, doesn't anything, , further confuse me, when inspect element, shows having id of "user_state".

i know i'm missing obvious, html.slim documentation lacking. can shed light on going on here?

in case matters, rails 4.0.0 ruby 2.1.2p95. in advance!

look @ docs, html_options = {} last argument, should be:

= f.select(:state, options_for_select(us_states, @user.state), {}, id: "state-dropdown") 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -