Browse Source

refactor: naming

pull/1318/head
natdeanlewissoftwire 2 years ago
parent
commit
d628fdc2ae
  1. 4
      app/models/validations/date_validations.rb
  2. 2
      config/initializers/feature_toggle.rb

4
app/models/validations/date_validations.rb

@ -64,7 +64,7 @@ module Validations::DateValidations
private private
def active_collection_end_date def active_collection_end_date
if FeatureToggle.startdate_next_collection_year_validation_enabled? if FeatureToggle.startdate_collection_window_validation_enabled?
next_collection_end_date next_collection_end_date
else else
@ -74,7 +74,7 @@ private
def validation_error_message def validation_error_message
start_date = current_collection_start_date start_date = current_collection_start_date
if FeatureToggle.startdate_next_collection_year_validation_enabled? if FeatureToggle.startdate_collection_window_validation_enabled?
I18n.t( I18n.t(
"validations.setup.startdate.current_and_next_financial_year", "validations.setup.startdate.current_and_next_financial_year",
current_start_year_short: start_date.strftime("%y"), current_start_year_short: start_date.strftime("%y"),

2
config/initializers/feature_toggle.rb

@ -4,7 +4,7 @@ class FeatureToggle
Rails.env.production? || Rails.env.test? || Rails.env.staging? Rails.env.production? || Rails.env.test? || Rails.env.staging?
end 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? Rails.env.production? || Rails.env.test? || Rails.env.staging?
end end

Loading…
Cancel
Save