Allow explicit reason for force delete mail template

This commit is contained in:
Karl Erik Õunapuu 2020-12-28 12:41:07 +02:00
parent 8a046b59bf
commit 38cefe7255
No known key found for this signature in database
GPG key ID: C9DD647298A34764
5 changed files with 13 additions and 6 deletions

View file

@ -10,6 +10,9 @@ module Domains
boolean :notify_by_email,
default: false,
description: 'Do we need to send email notification'
string :reason,
default: nil,
description: 'Which mail template to use explicitly'
validates :type, inclusion: { in: %i[fast_track soft] }
end

View file

@ -8,7 +8,7 @@ module Domains
send_email
domain.update(contact_notification_sent_date: Time.zone.today)
else
domain.update(template_name: domain.notification_template)
domain.update(template_name: domain.notification_template(explicit: reason))
end
end