Skip to content

Commit 94bbb95

Browse files
authored
Education phase school type (#8383)
1 parent bc0ea8b commit 94bbb95

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

app/helpers/organisations_helper.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def missing_profile_information_notification(prompt)
109109
end
110110

111111
def school_readable_phase(school)
112-
School::READABLE_PHASE_MAPPINGS.fetch(school.phase.to_sym).capitalize
112+
phase = School::READABLE_PHASE_MAPPINGS.fetch(school.phase.to_sym)
113+
t("organisations.search.results.phases.#{phase}")
113114
end
114115
end

db/seeds.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
southampton_la = SchoolGroup.find_by!(local_authority_code: "852")
1515
# Through school
1616
abraham_moss = School.find_by!(urn: "150009")
17+
# sizth form or college
18+
aston_maths = School.find_by!(urn: "151725")
1719

1820
# Team users
1921
users = [
@@ -36,16 +38,17 @@
3638
# Schools with phase 'n/a' are tricky to create dynamic vacancies for - they tend to be
3739
# special schools that don't quite fit the primary/secondary/higher pattern
3840
schools = [bexleyheath_school,
41+
aston_maths,
3942
weydon_trust.schools.detect { |s| s.phase != "not_applicable" && s.phase.exclude?("middle") },
4043
southampton_la.schools.detect { |s| s.phase != "not_applicable" && s.phase.exclude?("middle") },
4144
abraham_moss]
4245

4346
user_emails = users.map { |u| u.fetch(:email) }
4447

45-
organisations = [bexleyheath_school, weydon_trust, southampton_la, abraham_moss]
46-
4748
users.each do |user|
49+
organisations = [bexleyheath_school, weydon_trust, southampton_la, abraham_moss, aston_maths]
4850
publisher = Publisher.create(organisations: organisations, **user)
51+
4952
organisations.each do |organisation|
5053
FactoryBot.create(:publisher_preference, publisher: publisher, organisation: organisation)
5154
end

0 commit comments

Comments
 (0)