The "by_email" scope in VerifiedUser is no longer used anywhere in the
code. Its last occurrence was removed in commit 76daee1fb0 ("removes
unmasked emails and phones in forms").
9 lines
271 B
Ruby
9 lines
271 B
Ruby
class VerifiedUser < ApplicationRecord
|
|
scope :by_user, ->(user) { where(document_number: user.document_number) }
|
|
scope :by_phone, ->(phone) { where(phone: phone) }
|
|
|
|
def self.phone?(user)
|
|
by_user(user).by_phone(user.unconfirmed_phone).first.present?
|
|
end
|
|
end
|