demarches-normaliennes/app/models/mails/received_mail.rb

31 lines
960 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2020-08-06 16:35:45 +02:00
# == Schema Information
#
# Table name: received_mails
#
# id :integer not null, primary key
# body :text
# subject :string
# created_at :datetime not null
# updated_at :datetime not null
# procedure_id :integer
#
2017-03-06 22:37:37 +01:00
module Mails
# en_instruction
class ReceivedMail < ApplicationRecord
2017-03-06 22:37:37 +01:00
include MailTemplateConcern
belongs_to :procedure, optional: false
validates :subject, tags: true
validates :body, tags: true
SLUG = "received_mail"
DEFAULT_TEMPLATE_NAME = "notification_mailer/default_templates/received_mail"
2022-05-12 16:42:21 +02:00
DISPLAYED_NAME = I18n.t('activerecord.models.mail.received_mail.under_instruction')
DEFAULT_SUBJECT = I18n.t('activerecord.models.mail.received_mail.default_subject', dossier_number: '--numéro du dossier--', procedure_libelle: '--libellé démarche--')
DOSSIER_STATE = Dossier.states.fetch(:en_instruction)
2017-03-06 22:37:37 +01:00
end
end