From d65f1998d0c9f8eef84fea98d58315c9bea5f01a Mon Sep 17 00:00:00 2001 From: Amaia Castro Date: Thu, 9 Feb 2017 12:42:00 +0100 Subject: [PATCH] Sort comments in sidebar by number of votes --- app/views/legislation/annotations/_comments_box.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/legislation/annotations/_comments_box.html.erb b/app/views/legislation/annotations/_comments_box.html.erb index 8844fca38..f699308d5 100644 --- a/app/views/legislation/annotations/_comments_box.html.erb +++ b/app/views/legislation/annotations/_comments_box.html.erb @@ -6,7 +6,7 @@ <% end %>
- <% annotation.comments.roots.sort_by_newest.limit(Legislation::Annotation::COMMENTS_PAGE_SIZE).each do |comment| %> + <% annotation.comments.roots.sort_by_most_voted.limit(Legislation::Annotation::COMMENTS_PAGE_SIZE).each do |comment| %>

<%= truncate comment.body, length: 250 %>