diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 2b7f56cdf..e9fd423b9 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -58,7 +58,7 @@ class CommentsController < ApplicationController private def index_for_post @post = Post.find(params[:post_id]) - @comments = @post.comments + @comments = @post.comments.includes(:creator) @comments = @comments.visible(CurrentUser.user) unless params[:include_below_threshold] render :action => "index_for_post" end diff --git a/app/views/posts/show.html.erb b/app/views/posts/show.html.erb index 75cf09b3b..6aae9f88b 100644 --- a/app/views/posts/show.html.erb +++ b/app/views/posts/show.html.erb @@ -53,7 +53,7 @@
- <%= render "comments/partials/index/list", :comments => @post.comments, :post => @post, :show_header => false %> + <%= render "comments/partials/index/list", :comments => @post.comments.includes(:creator), :post => @post, :show_header => false %>