From b8503aa0c663eb221c7b1a6ce84edfe0ca858f42 Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Mon, 16 Dec 2024 10:20:34 +0000 Subject: [PATCH] Remove old feature flags (#2862) --- app/controllers/lettings_logs_controller.rb | 2 +- app/controllers/organisations_controller.rb | 4 ++-- app/controllers/sales_logs_controller.rb | 2 +- app/services/feature_toggle.rb | 16 ---------------- app/views/locations/check_answers.html.erb | 2 +- app/views/locations/show.html.erb | 2 +- app/views/schemes/check_answers.html.erb | 2 +- app/views/schemes/show.html.erb | 2 +- app/views/users/show.html.erb | 2 +- 9 files changed, 9 insertions(+), 25 deletions(-) diff --git a/app/controllers/lettings_logs_controller.rb b/app/controllers/lettings_logs_controller.rb index af3a6c32f..7fef9499b 100644 --- a/app/controllers/lettings_logs_controller.rb +++ b/app/controllers/lettings_logs_controller.rb @@ -22,7 +22,7 @@ class LettingsLogsController < LogsController @total_count = all_logs.size @unresolved_count = all_logs.unresolved.assigned_to(current_user).count @filter_type = "lettings_logs" - @duplicate_sets_count = FeatureToggle.duplicate_summary_enabled? && !current_user.support? ? duplicate_sets_count(current_user, current_user.organisation) : 0 + @duplicate_sets_count = !current_user.support? ? duplicate_sets_count(current_user, current_user.organisation) : 0 render "logs/index" end diff --git a/app/controllers/organisations_controller.rb b/app/controllers/organisations_controller.rb index 93b667a99..a6d9fb61e 100644 --- a/app/controllers/organisations_controller.rb +++ b/app/controllers/organisations_controller.rb @@ -186,7 +186,7 @@ class OrganisationsController < ApplicationController @total_count = organisation_logs.size @log_type = :lettings @filter_type = "lettings_logs" - @duplicate_sets_count = FeatureToggle.duplicate_summary_enabled? ? duplicate_sets_count(current_user, @organisation) : 0 + @duplicate_sets_count = duplicate_sets_count(current_user, @organisation) render "logs", layout: "application" end @@ -218,7 +218,7 @@ class OrganisationsController < ApplicationController @total_count = organisation_logs.size @log_type = :sales @filter_type = "sales_logs" - @duplicate_sets_count = FeatureToggle.duplicate_summary_enabled? ? duplicate_sets_count(current_user, @organisation) : 0 + @duplicate_sets_count = duplicate_sets_count(current_user, @organisation) render "logs", layout: "application" end diff --git a/app/controllers/sales_logs_controller.rb b/app/controllers/sales_logs_controller.rb index 8799fe528..237fd94d7 100644 --- a/app/controllers/sales_logs_controller.rb +++ b/app/controllers/sales_logs_controller.rb @@ -24,7 +24,7 @@ class SalesLogsController < LogsController @searched = search_term.presence @total_count = all_logs.size @filter_type = "sales_logs" - @duplicate_sets_count = FeatureToggle.duplicate_summary_enabled? && !current_user.support? ? duplicate_sets_count(current_user, current_user.organisation) : 0 + @duplicate_sets_count = !current_user.support? ? duplicate_sets_count(current_user, current_user.organisation) : 0 render "logs/index" end diff --git a/app/services/feature_toggle.rb b/app/services/feature_toggle.rb index 065c3b54e..8c3fe9362 100644 --- a/app/services/feature_toggle.rb +++ b/app/services/feature_toggle.rb @@ -11,10 +11,6 @@ class FeatureToggle !Rails.env.development? end - def self.duplicate_summary_enabled? - true - end - def self.service_unavailable? false end @@ -23,18 +19,6 @@ class FeatureToggle false end - def self.delete_scheme_enabled? - true - end - - def self.delete_location_enabled? - true - end - - def self.delete_user_enabled? - true - end - def self.local_storage? Rails.env.development? end diff --git a/app/views/locations/check_answers.html.erb b/app/views/locations/check_answers.html.erb index 8cd8bde2a..7a3a72e13 100644 --- a/app/views/locations/check_answers.html.erb +++ b/app/views/locations/check_answers.html.erb @@ -42,7 +42,7 @@ <% if LocationPolicy.new(current_user, @location).create? %>