mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Merge pull request #130 from internetee/story/117612061-removing-contact
Story/117612061 removing contact
This commit is contained in:
commit
4d177c466d
1 changed files with 5 additions and 0 deletions
|
@ -4,6 +4,11 @@ class ContactMailer < ApplicationMailer
|
||||||
def email_updated(old_email, email, contact_id, should_deliver)
|
def email_updated(old_email, email, contact_id, should_deliver)
|
||||||
@contact = Contact.find_by(id: contact_id)
|
@contact = Contact.find_by(id: contact_id)
|
||||||
@old_email = old_email
|
@old_email = old_email
|
||||||
|
unless @contact
|
||||||
|
Rails.logger.info "Cannot send email in #{self.class.name}##{__method__} with contact_id #{contact_id}. It cannot be found"
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
return unless email || @contact
|
return unless email || @contact
|
||||||
return if delivery_off?(@contact, should_deliver)
|
return if delivery_off?(@contact, should_deliver)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue