diff --git a/app/controllers/stats_controller.rb b/app/controllers/stats_controller.rb index 45a37327d..a2af0e9cb 100644 --- a/app/controllers/stats_controller.rb +++ b/app/controllers/stats_controller.rb @@ -1,8 +1,9 @@ class StatsController < ApplicationController def index - procedures = Procedure.where(created_at: Time.current.all_quarter).group("date_trunc('day', created_at)").count - dossiers = Dossier.where(created_at: Time.current.all_quarter).group("date_trunc('day', created_at)").count + procedures = Procedure.where(:created_at => 90.days.ago..Time.now).group("date_trunc('day', created_at)").count + dossiers = Dossier.where(:created_at => 90.days.ago..Time.now).group("date_trunc('day', created_at)").count + @procedures = clean_hash(procedures) @dossiers = clean_hash(dossiers) end