These were originally used to find uploaders with high-scoring uploads for promotion purposes. The weekly reports generated by Reportbooru are better suited for this. Also clean up some unused and redundant code.
11 lines
406 B
Ruby
11 lines
406 B
Ruby
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
|