Way to define id or class for options_for_select in rails? -


how can define id rails select statement , have tried doing in way like

<%= f.select :state, options_for_select(contact::states), :id=>"state_job" %> 

but not showing id when inspect in browser. please me out

<%= f.select :state, options_for_select(contact::states) %> 

the select tag helper looks options, html_options, need make sure id in right place (html_options) passing options parameter:

<%= f.select :state, options_for_select(contact::states), {}, {:id=>"state_job"} %> 

Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -