fix user promotion report

This commit is contained in:
r888888888
2013-06-30 23:43:20 -07:00
parent 5012edc4e7
commit 5ce831d4da

View File

@@ -23,9 +23,7 @@ module Reports
end
def users
User.with_timeout(30_000) do
User.joins(:posts).where("users.level < ? and users.post_upload_count >= 100", User::Levels::CONTRIBUTOR).where("posts.created_at >= ? and posts.fav_count >= 1", self.class.min_time).order("users.id").select("distinct users.id")
end
User.where("users.level < ? and users.post_upload_count >= 100", User::Levels::CONTRIBUTOR).order("created_at desc").limit(50)
end
end
end