From d628fdc2ae60c054bbe87effade2308c667e03fe Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Fri, 24 Feb 2023 12:35:02 +0000 Subject: [PATCH] refactor: naming --- app/models/validations/date_validations.rb | 4 ++-- config/initializers/feature_toggle.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/validations/date_validations.rb b/app/models/validations/date_validations.rb index d21311210..5fd99fd89 100644 --- a/app/models/validations/date_validations.rb +++ b/app/models/validations/date_validations.rb @@ -64,7 +64,7 @@ module Validations::DateValidations private def active_collection_end_date - if FeatureToggle.startdate_next_collection_year_validation_enabled? + if FeatureToggle.startdate_collection_window_validation_enabled? next_collection_end_date else @@ -74,7 +74,7 @@ private def validation_error_message start_date = current_collection_start_date - if FeatureToggle.startdate_next_collection_year_validation_enabled? + if FeatureToggle.startdate_collection_window_validation_enabled? I18n.t( "validations.setup.startdate.current_and_next_financial_year", current_start_year_short: start_date.strftime("%y"), diff --git a/config/initializers/feature_toggle.rb b/config/initializers/feature_toggle.rb index 54a6879f5..a7651919f 100644 --- a/config/initializers/feature_toggle.rb +++ b/config/initializers/feature_toggle.rb @@ -4,7 +4,7 @@ class FeatureToggle Rails.env.production? || Rails.env.test? || Rails.env.staging? end - def self.startdate_next_collection_year_validation_enabled? + def self.startdate_collection_window_validation_enabled? Rails.env.production? || Rails.env.test? || Rails.env.staging? end