posts: move fast_count to PostQueryBuilder.
This commit is contained in:
@@ -76,7 +76,7 @@ class UserPresenter
|
||||
end
|
||||
|
||||
def commented_posts_count(template)
|
||||
count = CurrentUser.without_safe_mode { Post.fast_count("commenter:#{user.name}") }
|
||||
count = CurrentUser.without_safe_mode { PostQueryBuilder.new("commenter:#{user.name}").fast_count }
|
||||
count = "?" if count.nil?
|
||||
template.link_to(count, template.posts_path(:tags => "commenter:#{user.name} order:comment_bumped"))
|
||||
end
|
||||
@@ -90,7 +90,7 @@ class UserPresenter
|
||||
end
|
||||
|
||||
def noted_posts_count(template)
|
||||
count = CurrentUser.without_safe_mode { Post.fast_count("noteupdater:#{user.name}") }
|
||||
count = CurrentUser.without_safe_mode { PostQueryBuilder.new("noteupdater:#{user.name}").fast_count }
|
||||
count = "?" if count.nil?
|
||||
template.link_to(count, template.posts_path(:tags => "noteupdater:#{user.name} order:note"))
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user