mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
parent
eada1a66dd
commit
8a831ee92c
30 changed files with 205 additions and 201 deletions
|
@ -1,18 +0,0 @@
|
|||
class DeleteDomainMailer < ApplicationMailer
|
||||
include Que::Mailer
|
||||
|
||||
def pending(domain:, old_registrant:)
|
||||
@domain = DomainPresenter.new(domain: domain, view: view_context)
|
||||
@registrar = RegistrarPresenter.new(registrar: domain.registrar, view: view_context)
|
||||
@verification_url = verification_url(domain)
|
||||
|
||||
subject = default_i18n_subject(domain_name: domain.name)
|
||||
mail(to: old_registrant.email, subject: subject)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def verification_url(domain)
|
||||
registrant_domain_delete_confirm_url(domain, token: domain.registrant_verification_token)
|
||||
end
|
||||
end
|
24
app/mailers/domain_delete_mailer.rb
Normal file
24
app/mailers/domain_delete_mailer.rb
Normal file
|
@ -0,0 +1,24 @@
|
|||
class DomainDeleteMailer < ApplicationMailer
|
||||
def confirm(domain:, registrar:, registrant:)
|
||||
@domain = DomainPresenter.new(domain: domain, view: view_context)
|
||||
@registrar = RegistrarPresenter.new(registrar: registrar, view: view_context)
|
||||
@confirm_url = confirm_url(domain)
|
||||
|
||||
subject = default_i18n_subject(domain_name: domain.name)
|
||||
mail(to: registrant.email, subject: subject)
|
||||
end
|
||||
|
||||
def forced(domain:, registrar:, registrant:)
|
||||
@domain = DomainPresenter.new(domain: domain, view: view_context)
|
||||
@registrar = RegistrarPresenter.new(registrar: registrar, view: view_context)
|
||||
@registrant = RegistrantPresenter.new(registrant: registrant, view: view_context)
|
||||
|
||||
mail(to: domain.primary_contact_emails)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def confirm_url(domain)
|
||||
registrant_domain_delete_confirm_url(domain, token: domain.registrant_verification_token)
|
||||
end
|
||||
end
|
|
@ -75,14 +75,6 @@ class DomainMailer < ApplicationMailer
|
|||
name: @domain.name)} [#{@domain.name}]")
|
||||
end
|
||||
|
||||
def force_delete(domain:)
|
||||
@domain = DomainPresenter.new(domain: domain, view: view_context)
|
||||
@registrar = RegistrarPresenter.new(registrar: domain.registrar, view: view_context)
|
||||
@registrant = RegistrantPresenter.new(registrant: domain.registrant, view: view_context)
|
||||
|
||||
mail(to: domain.primary_contact_emails)
|
||||
end
|
||||
|
||||
private
|
||||
# app/models/DomainMailModel provides the data for mail that can be composed_from
|
||||
# which ensures that values of objects are captured when they are valid, not later when this method is executed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue