summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-02-21 19:37:19 -0600
committerHombreLaser <sebastian-440@live.com>2023-02-21 19:37:19 -0600
commit3ac50b5873bbbef65a5fb413a7df115475f88ba6 (patch)
tree973ef7ac5fe93191466e21ae1647bf7199275c31 /app/models
parentcd750cf9d6eb9fadbcb8994d689980bf9c2bc241 (diff)
Añade rol al modelo de usuario
Diffstat (limited to 'app/models')
-rw-r--r--app/models/user_account.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/user_account.rb b/app/models/user_account.rb
index d9d67a4..ceb8334 100644
--- a/app/models/user_account.rb
+++ b/app/models/user_account.rb
@@ -11,6 +11,7 @@ class UserAccount < ApplicationRecord
validates :email, presence: true
validates :first_name, presence: true
validates :last_name, presence: true
+ validates :role, presence: true, inclusion: { in: %w[master regular] }
def full_name
"#{first_name} #{last_name}"