[#3356] Prepare for multiples tags per type de champ

This commit is contained in:
Frederic Merizen 2019-02-05 11:42:29 +01:00 committed by simon lehericey
parent 6c3cb2716e
commit d67af741d5

View file

@ -167,12 +167,14 @@ module TagsSubstitutionConcern
end
def types_de_champ_tags(types_de_champ, available_for_states)
types_de_champ.map do |tdc|
{
libelle: tdc.libelle,
description: tdc.description,
available_for_states: available_for_states
}
types_de_champ.flat_map do |tdc|
[
{
libelle: tdc.libelle,
description: tdc.description,
available_for_states: available_for_states
}
]
end
end