Select enum from form to set role
问题 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 set the enum role. I read this but it doesn't say how to utilize the new roles. This is the User class devise :database_authenticatable, :registerable, :confirmable, :recoverable, :rememberable, :trackable, :validatable enum role: [:user, :vip, :admin, :developer, :marketing, :support, :translator] after_initialize :set_default