Permalink
Browse files

Merge remote-tracking branch 'origin/pull/109/head'

  • Loading branch information...
2 parents 0e42c69 + 38b0a87 commit 64b93fa15bcb2e63b527de292191c872304f02c4 @schacon schacon committed Jun 12, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/models/doc_version.rb
@@ -23,7 +23,7 @@ def self.last_changed(doc_name)
end
def self.latest_versions(doc_name)
- for_doc(doc_name).joins(:version).order('versions.vorder DESC')
+ for_doc(doc_name).includes(:version).order('versions.vorder DESC')
end
def self.for_version(doc_name, version_name)
@@ -34,7 +34,7 @@ def self.version_changes(file, size = 20)
versions = []
unchanged = []
vers = DocVersion.latest_versions(file)
- for i in 0..(vers.size-2)
+ (vers.size-2).times do |i|
v = vers[i]
prev = vers[i+1]
sha2 = v.doc.blob_sha

0 comments on commit 64b93fa

Please sign in to comment.