Exclude draft dossier on statistiques
This commit is contained in:
parent
9c1268fdd5
commit
4282ab11be
1 changed files with 2 additions and 2 deletions
|
@ -10,10 +10,10 @@ class API::StatistiquesController < ApplicationController
|
|||
private
|
||||
|
||||
def total_dossiers
|
||||
Dossier.all.size
|
||||
Dossier.where.not(state: :draft).size
|
||||
end
|
||||
|
||||
def dossiers_mois
|
||||
Dossier.where(created_at: (1.month.ago)..Time.now).size
|
||||
Dossier.where.not(state: :draft).where(created_at: (1.month.ago)..Time.now).size
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue