From 9e5713f4707dcf6179554f1c5439e1e5df00e9ff Mon Sep 17 00:00:00 2001 From: simon lehericey Date: Wed, 6 Nov 2024 11:24:27 +0100 Subject: [PATCH] a champ_column can have options_for_select --- app/models/columns/champ_column.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/models/columns/champ_column.rb b/app/models/columns/champ_column.rb index c75b223ab..13aea0a27 100644 --- a/app/models/columns/champ_column.rb +++ b/app/models/columns/champ_column.rb @@ -1,11 +1,12 @@ # frozen_string_literal: true class Columns::ChampColumn < Column - attr_reader :stable_id + attr_reader :stable_id, :options_for_select - def initialize(procedure_id:, label:, stable_id:, tdc_type:, displayable: true, filterable: true, type: :text, value_column: :value) + def initialize(procedure_id:, label:, stable_id:, tdc_type:, displayable: true, filterable: true, type: :text, value_column: :value, options_for_select: []) @stable_id = stable_id @tdc_type = tdc_type + @options_for_select = options_for_select super( procedure_id:,