users: fix incorrect vote counts on user profile pages.

Deleted comment votes and post votes were being incorrectly counted.
This commit is contained in:
evazion
2021-12-01 04:47:47 -06:00
parent f86e16cfbd
commit 5bf4e31c25

View File

@@ -156,8 +156,8 @@
<tr>
<th>Votes</th>
<td>
<%= link_to user.post_votes.count, post_votes_path(search: { user_name: user.name }) %> posts,
<%= link_to user.comment_votes.count, comment_votes_path(search: { user_name: user.name }) %> comments,
<%= link_to user.post_votes.active.count, post_votes_path(search: { user_name: user.name }) %> posts,
<%= link_to user.comment_votes.active.count, comment_votes_path(search: { user_name: user.name }) %> comments,
<%= link_to user.forum_post_votes.count, forum_post_votes_path(search: { creator_name: user.name }) %> forum posts
</td>
</tr>