From 3ac50b5873bbbef65a5fb413a7df115475f88ba6 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Tue, 21 Feb 2023 19:37:19 -0600 Subject: AƱade rol al modelo de usuario MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user_account.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/models/user_account.rb') 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}" -- cgit v1.2.3