From 6c7308ad219bfd9deebe44630165375f2d22e3cc Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Tue, 21 Feb 2023 19:18:25 -0600 Subject: AƱade validadores al modelo de usuario MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user_account.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app') diff --git a/app/models/user_account.rb b/app/models/user_account.rb index b54c93d..d9d67a4 100644 --- a/app/models/user_account.rb +++ b/app/models/user_account.rb @@ -8,6 +8,9 @@ # session_key: string class UserAccount < ApplicationRecord has_secure_password validations: false + validates :email, presence: true + validates :first_name, presence: true + validates :last_name, presence: true def full_name "#{first_name} #{last_name}" -- cgit v1.2.3