[#3356] Simplify detection of handling champ
This commit is contained in:
parent
bcfc0f2535
commit
140a65cb36
1 changed files with 1 additions and 2 deletions
|
@ -196,8 +196,7 @@ module TagsSubstitutionConcern
|
||||||
def replace_type_de_champ_tags(text, types_de_champ, dossier_champs)
|
def replace_type_de_champ_tags(text, types_de_champ, dossier_champs)
|
||||||
types_de_champ.inject(text) do |acc, tag|
|
types_de_champ.inject(text) do |acc, tag|
|
||||||
champ = dossier_champs
|
champ = dossier_champs
|
||||||
.select { |dossier_champ| dossier_champ.libelle == tag[:libelle] }
|
.detect { |dossier_champ| dossier_champ.libelle == tag[:libelle] }
|
||||||
.first
|
|
||||||
|
|
||||||
replace_tag(acc, tag, champ)
|
replace_tag(acc, tag, champ)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue