[#3356] Remove redundant method

This commit is contained in:
Frederic Merizen 2019-02-05 15:27:42 +01:00 committed by simon lehericey
parent 5bc8bbbaa2
commit a8b9da9d3b

View file

@ -179,8 +179,8 @@ module TagsSubstitutionConcern
return ''
end
text = replace_type_de_champ_tags(text, filter_tags(champ_public_tags), dossier.champs)
text = replace_type_de_champ_tags(text, filter_tags(champ_private_tags), dossier.champs_private)
text = replace_tags_with_values_from_data(text, filter_tags(champ_public_tags), dossier.champs)
text = replace_tags_with_values_from_data(text, filter_tags(champ_private_tags), dossier.champs_private)
tags_and_datas = [
[dossier_tags, dossier],
@ -193,12 +193,6 @@ module TagsSubstitutionConcern
.inject(text) { |acc, (tags, data)| replace_tags_with_values_from_data(acc, tags, data) }
end
def replace_type_de_champ_tags(text, tags, dossier_champs)
tags.inject(text) do |acc, tag|
replace_tag(acc, tag, dossier_champs)
end
end
def replace_tags_with_values_from_data(text, tags, data)
if data.present?
tags.inject(text) do |acc, tag|