upload limits: refactor deletion confidence calculation.
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
module Reports
|
||||
class UserPromotions
|
||||
def self.deletion_confidence_interval_for(user, days = nil)
|
||||
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
|
||||
DanbooruMath.ci_lower_bound(deletions, total)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user