mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 00:42:04 +02:00
parent
296442e330
commit
487613db1e
14 changed files with 424 additions and 84 deletions
|
@ -1,11 +1,6 @@
|
|||
class ContactMailerPreview < ActionMailer::Preview
|
||||
def email_changed
|
||||
# Replace with `Contact.in_use` once https://github.com/internetee/registry/pull/1146 is merged
|
||||
contact = Contact.where('EXISTS(SELECT 1 FROM domains WHERE domains.registrant_id = contacts.id)
|
||||
OR
|
||||
EXISTS(SELECT 1 FROM domain_contacts WHERE domain_contacts.contact_id =
|
||||
contacts.id)')
|
||||
|
||||
contact = Contact.linked
|
||||
contact = contact.where.not(email: nil, country_code: nil, code: nil).first
|
||||
|
||||
ContactMailer.email_changed(contact: contact, old_email: 'old@inbox.test')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue