Browse Source

refactor: linting

pull/1378/head
natdeanlewissoftwire 3 years ago
parent
commit
8e68fa9ee3
  1. 2
      app/models/validations/date_validations.rb
  2. 6
      app/models/validations/setup_validations.rb

2
app/models/validations/date_validations.rb

@ -56,7 +56,7 @@ module Validations::DateValidations
scheme_during_startdate_validation(record, :startdate) scheme_during_startdate_validation(record, :startdate)
end end
private private
def is_rsnvac_first_let?(record) def is_rsnvac_first_let?(record)
[15, 16, 17].include?(record["rsnvac"]) [15, 16, 17].include?(record["rsnvac"])

6
app/models/validations/setup_validations.rb

@ -34,7 +34,7 @@ module Validations::SetupValidations
end end
end end
private private
def active_collection_start_date def active_collection_start_date
if FormHandler.instance.lettings_in_crossover_period? if FormHandler.instance.lettings_in_crossover_period?
@ -55,7 +55,7 @@ module Validations::SetupValidations
previous_start_year_long: previous_collection_start_date.strftime("#{previous_collection_start_date.day.ordinalize} %B %Y"), previous_start_year_long: previous_collection_start_date.strftime("#{previous_collection_start_date.day.ordinalize} %B %Y"),
current_end_year_short: current_collection_end_date.strftime("%y"), current_end_year_short: current_collection_end_date.strftime("%y"),
current_end_year_long:, current_end_year_long:,
) )
else else
I18n.t( I18n.t(
"validations.setup.startdate.current_financial_year", "validations.setup.startdate.current_financial_year",
@ -63,7 +63,7 @@ module Validations::SetupValidations
current_end_year_short: current_collection_end_date.strftime("%y"), current_end_year_short: current_collection_end_date.strftime("%y"),
current_start_year_long: current_collection_start_date.strftime("#{current_collection_start_date.day.ordinalize} %B %Y"), current_start_year_long: current_collection_start_date.strftime("#{current_collection_start_date.day.ordinalize} %B %Y"),
current_end_year_long:, current_end_year_long:,
) )
end end
end end

Loading…
Cancel
Save