From: Tom Hughes Date: Sun, 5 Feb 2017 16:18:56 +0000 (+0000) Subject: Make TraceController#list sort by id instead of timestamp X-Git-Tag: live~3628 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/94ab5c363562df89c7a372861b9f540984792ea4?ds=sidebyside 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. --- 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)