[#2486] followers_gestionnaires should not be a method
To help activerecord caching
This commit is contained in:
parent
37c45f0d29
commit
9403d4c042
1 changed files with 1 additions and 4 deletions
|
@ -27,6 +27,7 @@ class Dossier < ApplicationRecord
|
|||
has_many :invites_user, class_name: 'InviteUser', dependent: :destroy
|
||||
has_many :invites_gestionnaires, class_name: 'InviteGestionnaire', dependent: :destroy
|
||||
has_many :follows
|
||||
has_many :followers_gestionnaires, through: :follows, source: :gestionnaire
|
||||
has_many :avis, dependent: :destroy
|
||||
|
||||
belongs_to :procedure
|
||||
|
@ -151,10 +152,6 @@ class Dossier < ApplicationRecord
|
|||
end
|
||||
end
|
||||
|
||||
def followers_gestionnaires
|
||||
follows.includes(:gestionnaire).map(&:gestionnaire)
|
||||
end
|
||||
|
||||
def reset!
|
||||
etablissement.destroy
|
||||
|
||||
|
|
Loading…
Reference in a new issue