This commit is contained in:
r888888888
2017-09-13 13:17:16 -07:00
parent 75f87bcc8e
commit 95854756b4

View File

@@ -560,8 +560,8 @@ class User < ApplicationRecord
end
def used_upload_slots
uploaded_count = Post.for_user(id).where("created_at >= ?", 24.hours.ago).count
uploaded_comic_count = Post.for_user(id).tag_match("comic").where("created_at >= ?", 24.hours.ago).count / 3
uploaded_count = Post.for_user(id).where("created_at >= ?", 23.hours.ago).count
uploaded_comic_count = Post.for_user(id).tag_match("comic").where("created_at >= ?", 23.hours.ago).count / 3
uploaded_count - uploaded_comic_count
end