mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
Story#107821878 - manage old registrar
This commit is contained in:
parent
af023edf3a
commit
f9b2d2a202
3 changed files with 5 additions and 6 deletions
|
@ -1,8 +1,9 @@
|
|||
class DomainMailer < ApplicationMailer
|
||||
include Que::Mailer
|
||||
|
||||
def pending_update_request_for_old_registrant(domain_id, should_deliver)
|
||||
def pending_update_request_for_old_registrant(domain_id, old_registrant_id, should_deliver)
|
||||
@domain = Domain.find_by(id: domain_id)
|
||||
@old_registrant = Registrant.find(old_registrant_id)
|
||||
return unless @domain
|
||||
return if delivery_off?(@domain, should_deliver)
|
||||
|
||||
|
@ -16,8 +17,6 @@ class DomainMailer < ApplicationMailer
|
|||
return
|
||||
end
|
||||
|
||||
@old_registrant = Registrant.find(@domain.registrant_id_was)
|
||||
|
||||
confirm_path = "#{ENV['registrant_url']}/registrant/domain_update_confirms"
|
||||
@verification_url = "#{confirm_path}/#{@domain.id}?token=#{@domain.registrant_verification_token}"
|
||||
|
||||
|
|
|
@ -428,7 +428,7 @@ class Domain < ActiveRecord::Base
|
|||
new_registrant_email = registrant.email
|
||||
new_registrant_name = registrant.name
|
||||
|
||||
DomainMailer.pending_update_request_for_old_registrant(id, deliver_emails).deliver
|
||||
DomainMailer.pending_update_request_for_old_registrant(id, registrant_id_was, deliver_emails).deliver
|
||||
DomainMailer.pending_update_notification_for_new_registrant(id, deliver_emails).deliver
|
||||
|
||||
reload # revert back to original
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue