users: replace scopes with associations.

This commit is contained in:
evazion
2019-08-29 16:00:06 -05:00
parent 8756480500
commit 9a3e9747d8
14 changed files with 24 additions and 79 deletions

View File

@@ -80,7 +80,7 @@ class UserPresenter
end
def deleted_upload_count(template)
template.link_to(Post.for_user(user.id).deleted.count, template.posts_path(:tags => "status:deleted user:#{user.name}"))
template.link_to(user.posts.deleted.count, template.posts_path(:tags => "status:deleted user:#{user.name}"))
end
def favorite_count(template)