From aa0b7f53ef847cbbbf040bfbf68b8c4ca7ff3ea8 Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Fri, 15 Nov 2024 16:45:32 +0100 Subject: [PATCH] small comment explaining why we need to ensure used columns are present in `procedure.columns` --- app/models/concerns/columns_concern.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/concerns/columns_concern.rb b/app/models/concerns/columns_concern.rb index 5d61dc982..1e02c7370 100644 --- a/app/models/concerns/columns_concern.rb +++ b/app/models/concerns/columns_concern.rb @@ -37,6 +37,7 @@ module ColumnsConcern columns.concat(procedure_chorus_columns) if chorusable? && chorus_configuration.complete? # ensure the columns exist in main list + # otherwise, they will be found by the find_column method columns.filter { _1.id.in?(self.columns.map(&:id)) } end @@ -48,6 +49,7 @@ module ColumnsConcern columns.concat([groupe_instructeurs_id_column, followers_instructeurs_email_column]) # ensure the columns exist in main list + # otherwise, they will be found by the find_column method columns.filter { _1.id.in?(self.columns.map(&:id)) } end