Browse Source

Remove redundant method

pull/817/head
baarkerlounger 3 years ago
parent
commit
1063b6cb4b
  1. 12
      app/models/user.rb

12
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

Loading…
Cancel
Save