From e84298a94e86116f8f41e824acc253ccf3680cdd Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Mon, 31 Oct 2022 11:29:07 +0000 Subject: [PATCH] feat: hide behaviour behind feature toggle --- app/models/organisation.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/models/organisation.rb b/app/models/organisation.rb index 97f444fc5..e420ca9d8 100644 --- a/app/models/organisation.rb +++ b/app/models/organisation.rb @@ -86,7 +86,9 @@ class Organisation < ApplicationRecord { name: "Registration number", value: housing_registration_no || "", editable: false }, { name: "Rent_periods", value: rent_period_labels, editable: false, format: :bullet }, { name: "Owns housing stock", value: holds_own_stock ? "Yes" : "No", editable: false }, + ({ name: "Other stock owners", value: other_stock_owners, editable: false } unless FeatureToggle.managing_owning_enabled?), + ({ name: "Managing agents", value: managing_agents_label, editable: false } unless FeatureToggle.managing_owning_enabled?), { name: "Data protection agreement", value: data_protection_agreement_string, editable: false }, - ] + ].compact end end