feat(dossier): optional repetition champ should not add first row

This commit is contained in:
Paul Chavard 2023-02-02 09:59:03 +01:00 committed by Colin Darie
parent 4ec9a4be37
commit 6924b8e46d
14 changed files with 32 additions and 62 deletions

View file

@ -34,12 +34,12 @@ class ProcedureRevision < ApplicationRecord
def build_champs_public
# reload: it can be out of sync in test if some tdcs are added wihtout using add_tdc
types_de_champ_public.reload.map { |tdc| tdc.build_champ(revision: self) }
types_de_champ_public.reload.map(&:build_champ)
end
def build_champs_private
# reload: it can be out of sync in test if some tdcs are added wihtout using add_tdc
types_de_champ_private.reload.map { |tdc| tdc.build_champ(revision: self) }
types_de_champ_private.reload.map(&:build_champ)
end
def add_type_de_champ(params)