fixes 'My activity' comments count for admins/mods

This commit is contained in:
Juanjo Bazán
2015-11-17 19:40:18 +01:00
parent 16928d4e39
commit 19212a6b46
2 changed files with 2 additions and 1 deletions

View File

@@ -12,7 +12,7 @@ class UsersController < ApplicationController
@activity_counts = HashWithIndifferentAccess.new(
proposals: Proposal.where(author_id: @user.id).count,
debates: Debate.where(author_id: @user.id).count,
comments: Comment.where(user_id: @user.id).count)
comments: Comment.not_as_admin_or_moderator.where(user_id: @user.id).count)
end
def load_filtered_activity