Exclude draft Dossiers and unpublished Procedures from Stats

This commit is contained in:
gregoirenovel 2017-04-03 15:02:12 +02:00
parent 2074ac93ba
commit e370c4e393

View file

@ -1,8 +1,8 @@
class StatsController < ApplicationController
def index
procedures = Procedure
dossiers = Dossier
procedures = Procedure.where(:published => true)
dossiers = Dossier.where.not(:state => :draft)
@procedures_30_days_flow = thirty_days_flow_hash(procedures)
@dossiers_30_days_flow = thirty_days_flow_hash(dossiers)