From 1063b6cb4b8f3545543ef319ab2287af9f058e32 Mon Sep 17 00:00:00 2001 From: baarkerlounger Date: Fri, 5 Aug 2022 14:45:55 +0100 Subject: [PATCH] Remove redundant method --- app/models/user.rb | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/app/models/user.rb b/app/models/user.rb index 168e33411..66695d1cd 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -154,16 +154,4 @@ class User < ApplicationRecord def valid_for_authentication? super && active? end - -private - - def validate_email - unless email_valid?(email) - if User.exists?(["email LIKE ?", "%#{email}%"]) - errors.add :email, I18n.t("activerecord.errors.models.user.attributes.email.taken") - else - errors.add :email, I18n.t("activerecord.errors.models.user.attributes.email.invalid") - end - end - end end