diff options
author | HombreLaser <sebastian-440@live.com> | 2023-02-21 19:37:19 -0600 |
---|---|---|
committer | HombreLaser <sebastian-440@live.com> | 2023-02-21 19:37:19 -0600 |
commit | 3ac50b5873bbbef65a5fb413a7df115475f88ba6 (patch) | |
tree | 973ef7ac5fe93191466e21ae1647bf7199275c31 /app | |
parent | cd750cf9d6eb9fadbcb8994d689980bf9c2bc241 (diff) |
Añade rol al modelo de usuario
Diffstat (limited to 'app')
-rw-r--r-- | app/models/user_account.rb | 1 |
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}" |