mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 10:16:01 +02:00
Merge pull request #41 from internetee/109367018-email-pending-update-mention-old-registrant
109367018 email pending update mention old registrant
This commit is contained in:
commit
a59d61aa44
18 changed files with 419 additions and 260 deletions
|
@ -239,7 +239,7 @@ class Domain < ActiveRecord::Base
|
|||
end
|
||||
count += 1
|
||||
if domain.pending_update?
|
||||
DomainMailer.pending_update_expired_notification_for_new_registrant(domain.id).deliver
|
||||
send_mail :pending_update_expired_notification_for_new_registrant
|
||||
end
|
||||
if domain.pending_delete? || domain.pending_delete_confirmation?
|
||||
DomainMailer.pending_delete_expired_notification(domain.id, true).deliver
|
||||
|
@ -440,7 +440,6 @@ class Domain < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def pending_update!
|
||||
old_registrant_id = registrant_id
|
||||
return true if pending_update?
|
||||
self.epp_pending_update = true # for epp
|
||||
|
||||
|
@ -452,8 +451,8 @@ class Domain < ActiveRecord::Base
|
|||
new_registrant_email = registrant.email
|
||||
new_registrant_name = registrant.name
|
||||
|
||||
DomainMailer.pending_update_request_for_old_registrant(id, old_registrant_id, deliver_emails).deliver
|
||||
DomainMailer.pending_update_notification_for_new_registrant(id, old_registrant_id, deliver_emails).deliver
|
||||
send_mail :pending_update_request_for_old_registrant
|
||||
send_mail :pending_update_notification_for_new_registrant
|
||||
|
||||
reload # revert back to original
|
||||
|
||||
|
@ -819,5 +818,10 @@ class Domain < ActiveRecord::Base
|
|||
status_notes[status] = notes[i]
|
||||
end
|
||||
end
|
||||
|
||||
def send_mail(action)
|
||||
DomainMailer.send(action, DomainMailModel.new(self).send(action)).deliver
|
||||
end
|
||||
|
||||
end
|
||||
# rubocop: enable Metrics/ClassLength
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue