models: require belong_to associations on mail templates

This commit is contained in:
Pierre de La Morinerie 2020-07-20 17:25:17 +02:00
parent 29e8c43e5e
commit a7361fdbd3
7 changed files with 9 additions and 8 deletions

View file

@ -13,7 +13,7 @@ module Mails
class ReceivedMail < ApplicationRecord
include MailTemplateConcern
belongs_to :procedure
belongs_to :procedure, optional: false
SLUG = "received_mail"
DEFAULT_TEMPLATE_NAME = "notification_mailer/default_templates/received_mail"