mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 06:34:46 +02:00
- Remove `Que::Mailer` (#895) - Add preview - DRY templates - Add tests - Extract translations
37 lines
No EOL
1,009 B
Ruby
37 lines
No EOL
1,009 B
Ruby
class DomainDeleteMailerPreview < ActionMailer::Preview
|
|
def self.define_forced_templates
|
|
DomainDeleteMailer.force_delete_templates.each do |template_name|
|
|
define_method "forced_#{template_name}".to_sym do
|
|
DomainDeleteMailer.forced(domain: @domain,
|
|
registrar: @domain.registrar,
|
|
registrant: @domain.registrant,
|
|
template_name: template_name)
|
|
end
|
|
end
|
|
end
|
|
|
|
define_forced_templates
|
|
|
|
def initialize
|
|
@domain = Domain.first
|
|
super
|
|
end
|
|
|
|
def confirmation_request
|
|
DomainDeleteMailer.confirmation_request(domain: @domain,
|
|
registrar: @domain.registrar,
|
|
registrant: @domain.registrant)
|
|
end
|
|
|
|
def accepted
|
|
DomainDeleteMailer.accepted(@domain)
|
|
end
|
|
|
|
def rejected
|
|
DomainDeleteMailer.rejected(@domain)
|
|
end
|
|
|
|
def expired
|
|
DomainDeleteMailer.expired(@domain)
|
|
end
|
|
end |