Merge pull request #112 from medialab-prado/98-sort-by-votes
Sort comments in sidebar by number of votes
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="comments-wrapper">
|
||||
<% 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| %>
|
||||
<div class="comment">
|
||||
<div class="comment-text">
|
||||
<p><%= truncate comment.body, length: 250 %></p>
|
||||
|
||||
Reference in New Issue
Block a user