migrate emails text editor to new interface

This commit is contained in:
kara Diaby 2020-08-25 11:40:24 +02:00
parent a51d6046dc
commit ae61c279af
17 changed files with 154 additions and 166 deletions

View file

@ -474,7 +474,7 @@ class Procedure < ApplicationRecord
def closed_mail_template_attestation_inconsistency_state
# As an optimization, dont check the predefined templates (they are presumed correct)
if closed_mail.present?
tag_present = closed_mail.body.include?("--lien attestation--")
tag_present = closed_mail.body.to_s.include?("--lien attestation--")
if attestation_template&.activated? && !tag_present
:missing_tag
elsif !attestation_template&.activated? && tag_present