order comments by the most recent first

This commit is contained in:
David Gil
2015-08-11 20:27:37 +02:00
parent 9d2bece0b3
commit 44d4fa9fc4
5 changed files with 11 additions and 9 deletions

View File

@@ -43,10 +43,10 @@
<%= render 'comments/form', {parent: @debate, toggeable: false} %>
</div>
<% end %>
<%= render @debate.root_comments %>
<%= render @debate.root_comments.recent %>
</div>
<% if current_user && @debate.editable_by?(current_user) %>
<%= link_to t("debates.show.edit_debate_link"), edit_debate_path(@debate), :class => 'button radius right' %>
<% end %>
</div>
</section>
</section>