From e0c867f222906e1c902f5bf6a8cfac60d1d43cf1 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Tue, 14 May 2024 17:12:37 +0200 Subject: [PATCH] refactor: rename --- app/models/concerns/tags_substitution_concern.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/concerns/tags_substitution_concern.rb b/app/models/concerns/tags_substitution_concern.rb index 8ddef3b03..bb99cbe5c 100644 --- a/app/models/concerns/tags_substitution_concern.rb +++ b/app/models/concerns/tags_substitution_concern.rb @@ -283,7 +283,7 @@ module TagsSubstitutionConcern @escape_unsafe_tags = escape - flat_tags = tags_and_datas_list(dossier).each_with_object({}) do |tags, result| + flat_tags = available_tags(dossier).each_with_object({}) do |tags, result| valid_tags = tags_for_dossier_state(tags) valid_tags.each do |tag| @@ -369,7 +369,7 @@ module TagsSubstitutionConcern tokens = parse_tags(text) - tags_and_datas = tags_and_datas_list(dossier).filter_map do |tags| + tags_and_datas = available_tags(dossier).filter_map do |tags| dossier && [tags_for_dossier_state(tags).index_by { _1[:id] }, dossier] end @@ -444,7 +444,7 @@ module TagsSubstitutionConcern end end - def tags_and_datas_list(dossier) + def available_tags(dossier) [ champ_public_tags(dossier:), champ_private_tags(dossier:),