Skip to content
Snippets Groups Projects
Commit 5e03810b authored by pabois's avatar pabois
Browse files

correct scopes for alumni

parent f8abf8da
No related branches found
No related tags found
No related merge requests found
......@@ -3,8 +3,13 @@ module Education::School::WithAlumni
included do
has_many :education_cohorts,
class_name: 'Education::Cohort'
alias_attribute :cohorts, :education_cohorts
has_many :alumni, -> { distinct },
through: :programs
through: :education_cohorts,
source: :people
alias_attribute :university_person_alumni, :alumni
has_many :alumni_experiences, -> { distinct },
......@@ -19,11 +24,6 @@ module Education::School::WithAlumni
source: :organization
alias_attribute :university_person_alumni_organizations, :alumni_organizations
has_many :education_cohorts, -> { distinct },
class_name: 'Education::Cohort',
through: :programs
alias_attribute :cohorts, :education_cohorts
has_many :academic_years, -> { distinct },
class_name: 'Education::AcademicYear',
through: :education_cohorts,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment