I have a select option in a form:
<%= f.select :role, options_for_select(User.roles.keys.to_a, params[:role]), {}, class: 'form-control form-control-lg roleSelect' %>
These roles are defined in my model:
enum role: {user: 0, profile_user: 1}
Now in my dropdown when the user choses it shows user
and profile_user
as drop down option.
Is there any way to show another value to represent these in a drop down?
For example:
In the drop down I would rather show "I am a teacher" which maps to user
.
In the drop down I would rather show "I am here to study" which maps to profile_user
.