Instructeur: dedup procedures with multiple gi

This commit is contained in:
simon lehericey 2019-09-18 11:46:28 +02:00
parent 5ca5c640a0
commit 21577a0f0b
2 changed files with 14 additions and 1 deletions

View file

@ -8,7 +8,7 @@ class Instructeur < ApplicationRecord
has_many :assign_to, dependent: :destroy
has_many :groupe_instructeurs, through: :assign_to
has_many :procedures, through: :groupe_instructeurs
has_many :procedures, -> { distinct }, through: :groupe_instructeurs
has_many :assign_to_with_email_notifications, -> { with_email_notifications }, class_name: 'AssignTo', inverse_of: :instructeur
has_many :groupe_instructeur_with_email_notifications, through: :assign_to_with_email_notifications, source: :groupe_instructeur