Add extended registrar's info to "pending_deleted" mailer

#180
This commit is contained in:
Artur Beljajev 2016-11-03 20:16:01 +02:00
parent e52c747946
commit bebd49e5f4
11 changed files with 190 additions and 36 deletions

View file

@ -439,7 +439,8 @@ class Domain < ActiveRecord::Base
pending_delete_confirmation!
save(validate: false) # should check if this did succeed
DomainMailer.pending_deleted(id, registrant_id_was, deliver_emails).deliver
previous_registrant = Registrant.find(registrant_id_was)
DomainMailer.pending_deleted(domain: self, registrant: previous_registrant).deliver
end
def cancel_pending_delete