Avoid n+1 because of user.email
This commit is contained in:
parent
a3c0404302
commit
d780ab1c90
1 changed files with 5 additions and 3 deletions
|
@ -27,19 +27,21 @@ module NewGestionnaire
|
|||
|
||||
@a_suivre_dossiers = procedure
|
||||
.dossiers
|
||||
.includes(:user)
|
||||
.without_followers
|
||||
.en_cours
|
||||
|
||||
@followed_dossiers = current_gestionnaire
|
||||
.followed_dossiers
|
||||
.includes(:user)
|
||||
.where(procedure: @procedure)
|
||||
.en_cours
|
||||
|
||||
@termines_dossiers = procedure.dossiers.termine
|
||||
@termines_dossiers = procedure.dossiers.includes(:user).termine
|
||||
|
||||
@all_state_dossiers = procedure.dossiers.all_state
|
||||
@all_state_dossiers = procedure.dossiers.includes(:user).all_state
|
||||
|
||||
@archived_dossiers = procedure.dossiers.archived
|
||||
@archived_dossiers = procedure.dossiers.includes(:user).archived
|
||||
|
||||
@statut = params[:statut].present? ? params[:statut] : 'a-suivre'
|
||||
|
||||
|
|
Loading…
Reference in a new issue