ruby - rails 4 select_tag in form doesn't get saved -


i have select_tag tag in simple form, this:

<%= f.label :semester, "please select option:" %>   <%= select_tag(:semester, options_for_select([['option one', "option one"], ['option two', "option two"], ['option three', "option three"], ['option four', "option four"]])) %> 

the controller function links form has nothing non-standard in , neither model relevant table. see correct parameter being sent when in heroku logs, field corresponding select_tag not being updated in database when people edit record. code seems fine me , have no idea mising @ moment. somehow using select_tag wrong?

use

<%= f.select(:semester, options_for_select([['option one', "option one"], ['option two', "option two"], ['option three', "option three"], ['option four', "option four"]])) %> 

you have forgot use form object why not saving.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -