mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
make rubocop happy
This commit is contained in:
@@ -128,12 +128,11 @@ class UserStat < ActiveRecord::Base
|
|||||||
|
|
||||||
# topic_reply_count is a count of posts in other users' topics
|
# topic_reply_count is a count of posts in other users' topics
|
||||||
def update_topic_reply_count
|
def update_topic_reply_count
|
||||||
self.topic_reply_count =
|
self.topic_reply_count = Topic
|
||||||
Topic
|
.joins("INNER JOIN posts ON topics.id = posts.topic_id AND topics.user_id <> posts.user_id")
|
||||||
.joins("INNER JOIN posts ON topics.id = posts.topic_id AND topics.user_id <> posts.user_id")
|
.where("posts.deleted_at IS NULL AND posts.user_id = ?", self.user_id)
|
||||||
.where("posts.deleted_at IS NULL AND posts.user_id = ?", self.user_id)
|
.distinct
|
||||||
.distinct
|
.count
|
||||||
.count
|
|
||||||
end
|
end
|
||||||
|
|
||||||
MAX_TIME_READ_DIFF = 100
|
MAX_TIME_READ_DIFF = 100
|
||||||
|
|||||||
Reference in New Issue
Block a user