From d7dab9644e3de082b99c8b882be6963cdb6db9a0 Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire <94526761+natdeanlewissoftwire@users.noreply.github.com> Date: Tue, 1 Nov 2022 11:52:43 +0000 Subject: [PATCH] feat: remove redundant fields (#958) * feat: remove redundant fields * feat: hide behaviour behind feature toggle --- app/models/organisation.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/organisation.rb b/app/models/organisation.rb index 80dc9e6b3..e420ca9d8 100644 --- a/app/models/organisation.rb +++ b/app/models/organisation.rb @@ -86,9 +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 }, - { name: "Managing agents", value: managing_agents_label, 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