change user deletion scope from 120 days to 60 days

This commit is contained in:
r888888888
2015-10-19 13:23:18 -07:00
parent 8789aeb9d8
commit 09ca8df6b3
4 changed files with 5 additions and 5 deletions

View File

@@ -38,14 +38,14 @@ module Reports
end
def self.deletion_confidence_interval_for(user, days = nil)
date = (days || 120).days.ago
date = (days || 60).days.ago
deletions = Post.where("created_at >= ?", date).where(:uploader_id => user.id, :is_deleted => true).count
total = Post.where("created_at >= ?", date).where(:uploader_id => user.id).count
ci_lower_bound(deletions, total)
end
def self.negative_score_confidence_interval_for(user, days = nil)
date = (days || 120).days.ago
date = (days || 60).days.ago
hits = Post.where("created_at >= ? and score < 0", date).where(:uploader_id => user.id).count
total = Post.where("created_at >= ?", date).where(:uploader_id => user.id).count
ci_lower_bound(hits, total)