Only show the last 30 days of data in Stats
This commit is contained in:
parent
de01914fa7
commit
c4c6095abd
1 changed files with 2 additions and 2 deletions
|
@ -1,8 +1,8 @@
|
|||
class StatsController < ApplicationController
|
||||
|
||||
def index
|
||||
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 = Procedure.where(:created_at => 30.days.ago..Time.now).group("date_trunc('day', created_at)").count
|
||||
dossiers = Dossier.where(:created_at => 30.days.ago..Time.now).group("date_trunc('day', created_at)").count
|
||||
|
||||
@procedures = clean_hash(procedures)
|
||||
@dossiers = clean_hash(dossiers)
|
||||
|
|
Loading…
Reference in a new issue