include creator when loading comments
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</menu>
|
||||
|
||||
<section id="comments">
|
||||
<%= 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 %>
|
||||
</section>
|
||||
|
||||
<section id="notes" style="display: none;">
|
||||
|
||||
Reference in New Issue
Block a user