The "through" relation used in a HasManyThrough must be declared first

This commit is contained in:
gregoirenovel 2018-01-23 18:23:07 +01:00
parent 5b706cc7d4
commit 6afaf42e6a

View file

@ -7,8 +7,8 @@ class Gestionnaire < ActiveRecord::Base
has_many :assign_to, dependent: :destroy
has_many :procedures, -> { publiees_ou_archivees }, through: :assign_to
has_many :dossiers, -> { state_not_brouillon }, through: :procedures
has_many :followed_dossiers, through: :follows, source: :dossier
has_many :follows
has_many :followed_dossiers, through: :follows, source: :dossier
has_many :avis
has_many :dossiers_from_avis, through: :avis, source: :dossier