Ruby on Rails 4.1
I am using Devise with enum role. It currently sets a defualt role when the User is created. I want to add a field to the form that creates Users to se
The cleanest way that I've come with in order to use collection_select with enums is the following:
collection_select
enum
f.collection_select :diet_preference, User.roles.map{ |dp| [dp.first, dp.first.humanize] }, :first, :second