From 758b739aa39a0c627a5b0ccdd0b3b88f23990a69 Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 28 Aug 2023 14:25:45 +0200 Subject: [PATCH] amelioration(procedure.chorus): ajoute le feature flag `chorus` aux procedure pour activer/desactiver cette nouvelle feature --- app/models/concerns/procedure_chorus_concern.rb | 9 +++++++++ app/models/procedure.rb | 1 + 2 files changed, 10 insertions(+) create mode 100644 app/models/concerns/procedure_chorus_concern.rb diff --git a/app/models/concerns/procedure_chorus_concern.rb b/app/models/concerns/procedure_chorus_concern.rb new file mode 100644 index 000000000..5de495d1e --- /dev/null +++ b/app/models/concerns/procedure_chorus_concern.rb @@ -0,0 +1,9 @@ +module ProcedureChorusConcern + extend ActiveSupport::Concern + + included do + def chorusable? + feature_enabled?(:chorus) + end + end +end diff --git a/app/models/procedure.rb b/app/models/procedure.rb index 742b92343..79b1bc2ed 100644 --- a/app/models/procedure.rb +++ b/app/models/procedure.rb @@ -4,6 +4,7 @@ class Procedure < ApplicationRecord include InitiationProcedureConcern include ProcedureGroupeInstructeurAPIHackConcern include ProcedureSVASVRConcern + include ProcedureChorusConcern include Discard::Model self.discard_column = :hidden_at