Merge pull request #809 from sgmap/export-perf

Export perf
This commit is contained in:
gregoirenovel 2017-10-11 12:47:08 +02:00 committed by GitHub
commit 2f97efe12c

View file

@ -58,7 +58,7 @@ class Dossier < ActiveRecord::Base
scope :nouveaux, -> { not_archived.state_nouveaux } scope :nouveaux, -> { not_archived.state_nouveaux }
scope :en_instruction, -> { not_archived.state_en_instruction } scope :en_instruction, -> { not_archived.state_en_instruction }
scope :termine, -> { not_archived.state_termine } scope :termine, -> { not_archived.state_termine }
scope :downloadable, -> { state_not_brouillon } scope :downloadable, -> { state_not_brouillon.includes(:entreprise, :etablissement, :champs, :champs_private) }
scope :en_cours, -> { not_archived.state_en_construction_ou_instruction } scope :en_cours, -> { not_archived.state_en_construction_ou_instruction }
scope :without_followers, -> { includes(:follows).where(follows: { id: nil }) } scope :without_followers, -> { includes(:follows).where(follows: { id: nil }) }
scope :with_unread_notifications, -> { where(notifications: { already_read: false }) } scope :with_unread_notifications, -> { where(notifications: { already_read: false }) }