[#1110] Use tags method rather than ALLOWED_TAGS class constant
This commit is contained in:
parent
b9a1f707f5
commit
e985439416
2 changed files with 5 additions and 1 deletions
|
@ -34,6 +34,10 @@ module MailTemplateConcern
|
|||
replace_tags(body, dossier)
|
||||
end
|
||||
|
||||
def tags
|
||||
self.class.const_get(:ALLOWED_TAGS)
|
||||
end
|
||||
|
||||
def replace_tags(string, dossier)
|
||||
TAGS.inject(string) do |acc, tag|
|
||||
acc.gsub("--#{tag[:libelle]}--", replace_tag(tag, dossier)) || acc
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
Balise
|
||||
%th
|
||||
Description
|
||||
- @mail_template.class.const_get(:ALLOWED_TAGS).each do |tag|
|
||||
- @mail_template.tags.each do |tag|
|
||||
%tr
|
||||
%td.center
|
||||
= "--#{tag[:libelle]}--"
|
||||
|
|
Loading…
Reference in a new issue