From 2c7d00c1009bdee2ee4ed77da4eae7ca6438f35f Mon Sep 17 00:00:00 2001 From: Carl Chenet Date: Tue, 23 May 2017 10:30:02 +0200 Subject: [PATCH] comments: order by id, might be faster --- app/controllers/comments_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index 5987581..dc8a0c9 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -231,7 +231,7 @@ class CommentsController < ApplicationController @comments = Comment.where( :is_deleted => false, :is_moderated => false ).order( - "created_at DESC" + "id DESC" ).offset( (@page - 1) * COMMENTS_PER_PAGE ).limit(