Merge pull request #4328 from tchak/better-logo-include

Use built in active_storage helper
This commit is contained in:
LeSim 2019-09-17 12:00:17 +02:00 committed by GitHub
commit b32b12afbb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,8 @@ module Instructeurs
def index
@procedures = current_instructeur
.visible_procedures
.includes(:logo_attachment, :logo_active_storage_attachment, :defaut_groupe_instructeur)
.with_attached_logo
.includes(:defaut_groupe_instructeur)
.order(archived_at: :desc, published_at: :desc, created_at: :desc)
groupe_instructeurs = current_instructeur.groupe_instructeurs.where(procedure: @procedures)