changed enum to string in user and job model
This commit is contained in:
@@ -22,9 +22,9 @@ class User < ApplicationRecord
|
||||
normalizes :email, with: -> { _1.strip.downcase }
|
||||
|
||||
enum :role, {
|
||||
user: 0,
|
||||
operator: 1,
|
||||
admin: 2
|
||||
user: "user",
|
||||
operator: "operator",
|
||||
admin: "admin"
|
||||
}
|
||||
|
||||
before_validation if: :email_changed?, on: :update do
|
||||
|
||||
Reference in New Issue
Block a user