Move all the existing interactors to Domains namespace

This commit is contained in:
Alex Sherman 2020-11-30 13:46:53 +05:00
parent 09a58fa432
commit 5363c546a5
34 changed files with 250 additions and 222 deletions

View 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