app/components/shared/comments_component.html.erb
<div class="row comments">
<div id="comments" class="small-12 column">
<%= content %>
<% cache cache_key do %>
<% if current_user %>
<%= render Comments::FormComponent.new(record, valuation: valuation) %>
<% else %>
<%= render "shared/login_to_comment" %>
<% end %>
<%= render Shared::OrderLinksComponent.new("comments", anchor: "comments") %>
<%= render "comments/comment_list", comments: comment_tree.root_comments, valuation: valuation %>
<%= paginate comment_tree.root_comments, params: { anchor: "comments" } %>
<% end %>
</div>
</div>