Implements active user and submissions for global dashboard

This commit is contained in:
Chrisbr 2014-06-02 14:57:53 +02:00
parent 7573a19240
commit dd22ce3608
3 changed files with 24 additions and 8 deletions

View file

@ -6,6 +6,8 @@ class Admin::ConferenceController < ApplicationController
@new_user = User.where('created_at > ?', current_user.last_sign_in_at).count
@new_reg = Registration.where('created_at > ?', current_user.last_sign_in_at).count
@total_reg = Registration.count
@active_user = User.where('last_sign_in_at > ?', Date.today - 3.months).count
@submissions_count = Event.count
@conferences = Conference.select('id, short_title, color, start_date,
registration_end_date, registration_start_date')