mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 03:58:27 +02:00
Move emails & domains to citext, CC fixes
This commit is contained in:
parent
438a2e05ab
commit
f8eea08357
5 changed files with 34 additions and 12 deletions
|
@ -2,10 +2,7 @@ class VerifyEmailsJob < Que::Job
|
|||
def run(verification_id)
|
||||
email_address_verification = run_condition(EmailAddressVerification.find(verification_id))
|
||||
|
||||
if email_address_verification.recently_verified?
|
||||
destroy
|
||||
return
|
||||
end
|
||||
return if email_address_verification.recently_verified?
|
||||
|
||||
ActiveRecord::Base.transaction do
|
||||
email_address_verification.verify
|
||||
|
|
|
@ -3,15 +3,15 @@ module Concerns
|
|||
extend ActiveSupport::Concern
|
||||
|
||||
def email_verification
|
||||
EmailAddressVerification.find_or_create_by(email: email,
|
||||
domain: domain(email))
|
||||
EmailAddressVerification.find_or_create_by(email: email.downcase,
|
||||
domain: domain(email.downcase))
|
||||
end
|
||||
|
||||
def billing_email_verification
|
||||
return unless attribute_names.include?('billing_email')
|
||||
|
||||
EmailAddressVerification.find_or_create_by(email: billing_email,
|
||||
domain: domain(email))
|
||||
EmailAddressVerification.find_or_create_by(email: billing_email.downcase,
|
||||
domain: domain(email.downcase))
|
||||
end
|
||||
|
||||
def domain(email)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue