performance tweaks for rails 4.1
This commit is contained in:
@@ -66,7 +66,7 @@ class PostVersion < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def sequence_for_post
|
||||
versions = PostVersion.where(:post_id => post_id).order("updated_at desc, id desc").all
|
||||
versions = PostVersion.where(:post_id => post_id).order("updated_at desc, id desc")
|
||||
diffs = []
|
||||
versions.each_index do |i|
|
||||
if i < versions.size - 1
|
||||
|
||||
Reference in New Issue
Block a user