From 7ca8635051bf2fc3e3484d0d4d32c96a78862ce0 Mon Sep 17 00:00:00 2001 From: albert Date: Sat, 2 Mar 2013 21:13:21 -0500 Subject: [PATCH] fixes #691 --- app/models/post_version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/post_version.rb b/app/models/post_version.rb index 27f8cb4e5..bb218d4d1 100644 --- a/app/models/post_version.rb +++ b/app/models/post_version.rb @@ -94,7 +94,7 @@ class PostVersion < ActiveRecord::Base end def previous - PostVersion.where("post_id = ? and id < ?", post_id, id).order("updated_at desc").first + PostVersion.where("post_id = ? and updated_at < ?", post_id, updated_at).order("updated_at desc").first end def truncated_source