Skip to content

Commit

Permalink
Rename all_npq_courses in funding_eligibility
Browse files Browse the repository at this point in the history
The previous name (all_npq_courses) initially reads as checking all possible NPQ courses which would be wrong. Changing the name to this makes it clearer what is being checked.
  • Loading branch information
Lockyy committed Dec 2, 2022
1 parent 51ec6a4 commit d4739dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/services/npq/funding_eligibility.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def npq_course
@npq_course ||= NPQCourse.find_by!(identifier: npq_course_identifier)
end

def all_npq_courses
def npq_course_and_rebranded_alternatives
npq_course.rebranded_alternative_courses
end

Expand All @@ -38,7 +38,7 @@ def accepted_applications
@accepted_applications ||= begin
application_ids = users.flat_map do |user|
user.npq_applications
.where(npq_course: all_npq_courses)
.where(npq_course: npq_course_and_rebranded_alternatives)
.where(eligible_for_funding: true)
.accepted
.pluck(:id)
Expand Down

0 comments on commit d4739dc

Please sign in to comment.