From ecf2de86ec1d1fe892f384c6d41802054cf2d1f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Gaya?= <sebastien.gaya@gmail.com> Date: Tue, 1 Feb 2022 11:11:16 +0100 Subject: [PATCH] fix --- app/models/communication/website/with_menu_items.rb | 2 +- app/models/education/program.rb | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/models/communication/website/with_menu_items.rb b/app/models/communication/website/with_menu_items.rb index 963372151..4a343d7dc 100644 --- a/app/models/communication/website/with_menu_items.rb +++ b/app/models/communication/website/with_menu_items.rb @@ -57,7 +57,7 @@ module Communication::Website::WithMenuItems end def menu_item_kind_teachers? - about_school? && about.university_people_through_teachers.any? + about_school? && about.university_people_through_program_involvements.any? end def menu_item_kind_research_volumes? diff --git a/app/models/education/program.rb b/app/models/education/program.rb index fcebaba4a..223a6f8bd 100644 --- a/app/models/education/program.rb +++ b/app/models/education/program.rb @@ -63,12 +63,6 @@ class Education::Program < ApplicationRecord class_name: 'Education::Program', foreign_key: :parent_id, dependent: :destroy - has_many :teachers, - class_name: 'Education::Program::Teacher', - dependent: :destroy - has_many :university_people_through_teachers, - through: :teachers, - source: :person has_many :roles, class_name: 'Education::Program::Role', dependent: :destroy -- GitLab