Skip to content

Commit

Permalink
Rename some methods
Browse files Browse the repository at this point in the history
Just making the code a little easier to follow
  • Loading branch information
rjlynch committed Dec 11, 2024
1 parent 68e5f5e commit 3e31735
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions app/models/journeys/page_sequence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 3e31735

Please sign in to comment.