From 94ab5c363562df89c7a372861b9f540984792ea4 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 5 Feb 2017 16:18:56 +0000 Subject: [PATCH 1/1] Make TraceController#list sort by id instead of timestamp The effect is much the same but id is guaranteed to give a stable sort if two traces have the same timestamp. --- app/controllers/trace_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/trace_controller.rb b/app/controllers/trace_controller.rb index b7c9ccd70..f3fa81fd8 100644 --- a/app/controllers/trace_controller.rb +++ b/app/controllers/trace_controller.rb @@ -63,7 +63,7 @@ class TraceController < ApplicationController @page_size = 20 @traces = @traces.visible - @traces = @traces.order("timestamp DESC") + @traces = @traces.order(:id => :desc) @traces = @traces.offset((@page - 1) * @page_size) @traces = @traces.limit(@page_size) @traces = @traces.includes(:user, :tags) -- 2.43.2