I use simple_form to manage my users. To select a user role, I use the input as :: radio_button.
The collection comes from an enumeration in the user model. How to change the text to show something specific, like "Super Admin" instead of super_admin?
_form.html.slim
= form.input :role, collection: User.roles, as: :radio_buttons, item_wrapper_class: 'btn btn-default', checked: User.roles[user.role], required: true
user.rb
enum role: [:super_admin, :admin, :generic]
source
share