This commit is contained in:
albert
2013-03-02 21:13:21 -05:00
parent 43a32efdc5
commit 7ca8635051

View File

@@ -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