Added ability to change user roles in admin/users index

This commit is contained in:
2024-09-18 10:42:12 +02:00
parent ace50699fb
commit a169b8fae8
6 changed files with 35 additions and 15 deletions

View File

@@ -23,6 +23,8 @@ class User < ApplicationRecord
normalizes :email, with: -> { _1.strip.downcase }
AVAILABLE_ROLES = [ :user, :operator, :admin ]
enum :role, {
user: "user",
operator: "operator",