include id in sort

cause mysql doesn't do subsecond timestamps, it keeps ordering consistent

refs CNVS-7032

Change-Id: I5e56202ad06396f1f34b449091c94052c90d9eba
Reviewed-on: https://gerrit.instructure.com/28569
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
This commit is contained in:
Cody Cutrer 2014-01-14 16:11:16 -07:00
parent 227515685c
commit 501e760528
1 changed files with 1 additions and 1 deletions

View File

@ -785,7 +785,7 @@ class ConversationsController < ApplicationController
@conversation_contexts[conversation.conversation.id] = feed_context_content(conversation)
end
end
@entries = @entries.sort_by{|e| e.created_at}.reverse
@entries = @entries.sort_by{|e| [e.created_at, e.id] }.reverse
@entries.each do |entry|
feed.entries << entry.to_atom(:additional_content => @conversation_contexts[entry.conversation.id])
end