Remove email verification legacy code

This commit is contained in:
Thiago Youssef 2022-04-13 11:51:08 +03:00
parent 47a93b200a
commit f8612d687f
17 changed files with 36 additions and 538 deletions

View file

@ -25,11 +25,6 @@ class Contact < ApplicationRecord
alias_attribute :kind, :ident_type
alias_attribute :copy_from_id, :original_id # Old attribute name; for PaperTrail
scope :email_verification_failed, lambda {
joins('LEFT JOIN email_address_verifications emv ON contacts.email = emv.email')
.where('success = false and verified_at IS NOT NULL')
}
scope :with_different_company_name, (lambda do |company|
where("ident = ? AND ident_country_code = 'EE' AND name != ?",
company.registration_number,