From 3e3173500b76faaebe9f670ddf8bc7c1b56f84aa Mon Sep 17 00:00:00 2001 From: Richard Lynch Date: Wed, 20 Nov 2024 13:29:25 +0000 Subject: [PATCH] Rename some methods Just making the code a little easier to follow --- .../additional_payments_for_teaching/slug_sequence.rb | 4 ++-- app/models/journeys/page_sequence.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/journeys/additional_payments_for_teaching/slug_sequence.rb b/app/models/journeys/additional_payments_for_teaching/slug_sequence.rb index 24871f9f85..730ef87c1d 100644 --- a/app/models/journeys/additional_payments_for_teaching/slug_sequence.rb +++ b/app/models/journeys/additional_payments_for_teaching/slug_sequence.rb @@ -133,7 +133,7 @@ def slugs end if answers.trainee_teacher? - trainee_teacher_slugs(sequence) + trainee_teacher_slugs!(sequence) sequence.delete("eligible-degree-subject") unless lup_eligibility_checker.indicated_ineligible_itt_subject? else sequence.delete("ineligible") unless [:ineligible, :eligible_later].include?(overall_eligibility_status) @@ -192,7 +192,7 @@ def replace_ecp_only_induction_not_completed_slugs(sequence) # This method swaps out the entire slug sequence and replaces it with this tiny # journey. - def trainee_teacher_slugs(sequence) + def trainee_teacher_slugs!(sequence) trainee_slugs = %w[ current-school nqt-in-academic-year-after-itt diff --git a/app/models/journeys/page_sequence.rb b/app/models/journeys/page_sequence.rb index 7502598ff5..ce2c27b95a 100644 --- a/app/models/journeys/page_sequence.rb +++ b/app/models/journeys/page_sequence.rb @@ -88,10 +88,10 @@ def can_skip_next_slug? end def lup_policy_and_trainee_teacher_at_lup_school? - journey == Journeys::AdditionalPaymentsForTeaching && lup_teacher_at_lup_school + journey == Journeys::AdditionalPaymentsForTeaching && lup_trainee_at_lup_school end - def lup_teacher_at_lup_school + def lup_trainee_at_lup_school answers.nqt_in_academic_year_after_itt == false && Policies::LevellingUpPremiumPayments::SchoolEligibility.new(answers.current_school).eligible? end