Commit 6ad774b9 authored by Albert Yi's avatar Albert Yi

add more deterministic ordering for post versions

parent 63ab6374
......@@ -85,7 +85,7 @@ class Post < ApplicationRecord
if PostArchive.enabled?
has_many :versions, -> {order("post_versions.updated_at ASC")}, :class_name => "PostArchive", :dependent => :destroy
has_many :versions, -> { Rails.env.test? ? order("post_versions.updated_at ASC, ASC") : order("post_versions.updated_at ASC") }, :class_name => "PostArchive", :dependent => :destroy
module FileMethods
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment