Skip to content
Snippets Groups Projects
Commit 9c704a9b authored by Arnaud Levy's avatar Arnaud Levy
Browse files

fix

parent 555ad0ea
No related branches found
No related tags found
No related merge requests found
......@@ -70,9 +70,9 @@ module Communication::Website::WithAbouts
@people ||= begin
people = authors
if about_school?
people += about&.university_people_through_role_involvements
people += about&.university_people_through_program_involvements
people += about&.university_people_through_program_role_involvements
people += about.university_people_through_role_involvements
people += about.university_people_through_program_involvements
people += about.university_people_through_program_role_involvements
elsif about_journal?
people += about.people
end
......
......@@ -26,6 +26,11 @@
class Education::School < ApplicationRecord
include WithGit
has_and_belongs_to_many :programs,
class_name: 'Education::Program',
join_table: 'education_programs_schools',
foreign_key: 'education_school_id',
association_foreign_key: 'education_program_id'
belongs_to :university
has_many :websites,
class_name: 'Communication::Website',
......@@ -47,11 +52,6 @@ class Education::School < ApplicationRecord
has_many :university_people_through_program_role_involvements,
through: :programs,
source: :university_people_through_role_involvements
has_and_belongs_to_many :programs,
class_name: 'Education::Program',
join_table: 'education_programs_schools',
foreign_key: 'education_school_id',
association_foreign_key: 'education_program_id'
validates :name, :address, :city, :zipcode, :country, presence: true
......
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