remove logo n+1
This commit is contained in:
parent
9770212e1d
commit
afa0237349
1 changed files with 4 additions and 1 deletions
|
@ -6,7 +6,10 @@ module Instructeurs
|
|||
ITEMS_PER_PAGE = 25
|
||||
|
||||
def index
|
||||
@procedures = current_instructeur.visible_procedures.order(archived_at: :desc, published_at: :desc, created_at: :desc)
|
||||
@procedures = current_instructeur
|
||||
.visible_procedures
|
||||
.includes(:logo_attachment, :logo_active_storage_attachment)
|
||||
.order(archived_at: :desc, published_at: :desc, created_at: :desc)
|
||||
|
||||
groupe_instructeurs = current_instructeur.groupe_instructeurs.where(procedure: @procedures)
|
||||
|
||||
|
|
Loading…
Reference in a new issue