handle users without created at date

This commit is contained in:
Diaspora Europe 2012-03-21 09:56:06 +01:00
parent 416b577eca
commit 30af2e7188

View file

@ -30,7 +30,7 @@ class AdminsController < ApplicationController
end end
def weekly_user_stats def weekly_user_stats
@created_users = User.where("username IS NOT NULL") @created_users = User.where("username IS NOT NULL and created_at IS NOT NULL")
@created_users_by_week = Hash.new{ |h,k| h[k] = [] } @created_users_by_week = Hash.new{ |h,k| h[k] = [] }
@created_users.each do |u| @created_users.each do |u|
unless u.nil? unless u.nil?