comments: when showing user threads, always load votes

This commit is contained in:
Carl Chenet 2017-05-16 19:36:52 +02:00
parent 921efbabe9
commit 432977c087

View file

@ -274,7 +274,7 @@ class CommentsController < ApplicationController
comments_by_thread_id = comments.group_by(&:thread_id)
@threads = comments_by_thread_id.values_at(*thread_ids).compact
if @user && (@showing_user.id == @user.id)
if @user
@votes = Vote.comment_votes_by_user_for_story_hash(@user.id,
comments.map(&:story_id).uniq)