mirror of
https://github.com/internetee/registry.git
synced 2025-07-31 23:16:23 +02:00
Move all the existing interactors to Domains namespace
This commit is contained in:
parent
09a58fa432
commit
5363c546a5
34 changed files with 250 additions and 222 deletions
24
app/interactions/domains/delete_confirm/send_request.rb
Normal file
24
app/interactions/domains/delete_confirm/send_request.rb
Normal file
|
@ -0,0 +1,24 @@
|
|||
module Domains
|
||||
module DeleteConfirm
|
||||
class SendRequest < ActiveInteraction::Base
|
||||
object :domain,
|
||||
class: Domain,
|
||||
description: 'Domain to send delete confirmation'
|
||||
|
||||
def execute
|
||||
log
|
||||
DomainDeleteMailer.confirmation_request(domain: domain,
|
||||
registrar: domain.registrar,
|
||||
registrant: domain.registrant).deliver_later
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def log
|
||||
message = "Send DomainDeleteMailer#confirm email for domain #{domain.name} (##{domain.id})"\
|
||||
" to #{domain.registrant.email}"
|
||||
Rails.logger.info(message)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue