adding counter_cache to comments children and WIPing on the issue

This commit is contained in:
David Gil
2015-08-11 18:43:53 +02:00
parent e880cb4f1a
commit 19ef481917
10 changed files with 66 additions and 23 deletions

View File

@@ -6,7 +6,13 @@
<div class="debate-info">
<%= image_tag('user_default.jpg', class: 'author-photo', size: '32x32') %>
<span class="author"><%= @debate.author.name %></span><span class="bullet">&nbsp;&bullet;&nbsp;</span> <%= l @debate.created_at.to_date %> <span class="bullet">&nbsp;&bullet;&nbsp;</span><i class="icon-chat-bubble-two"></i>&nbsp;<%= link_to pluralize(@debate.comment_threads.count, t("debates.show.comment"), t("debates.show.comments")), "#comments" %>
<span class="author">
<%= @debate.author.name %>
</span>
<span class="bullet">&nbsp;&bullet;&nbsp;</span>
<%= l @debate.created_at.to_date %>
<span class="bullet">&nbsp;&bullet;&nbsp;</span>
<i class="icon-chat-bubble-two"></i>&nbsp;<%= link_to t("debates.show.comments", count: @debate.comment_threads.count), "#comments" %>
</div>
<%= @debate.description %>
@@ -36,7 +42,7 @@
<section class="row-full comments">
<div class="row">
<div id="comments" class="small-12 column">
<h2><%= t("debates.show.comments") %></h2>
<h2><%= t("debates.show.comments_title") %></h2>
<% if user_signed_in? %>
<div>
<%= t("debates.show.leave_comment") %>