Can any one help me in creating a drop down list in rails. I’m having a user table with a role field and I want to create a drop down list with values manager, investigator, director for role.How I can extract this value to parms[:role] . I’m new to rails.
Share
If you are using form_for (not form_tag), then it should go like this.
Then you’ll have
params[:user][:role]available in your controller.Refer this for more info on select helper.