Skip to content

Commit

Permalink
Passed: specs/acts_as_audited.rb:225 + 242
Browse files Browse the repository at this point in the history
Still have to pass specs/acts_as_audited.rb:340

All passes on 3.0.x still.
  • Loading branch information
fivetwentysix committed Sep 2, 2011
1 parent a818118 commit c26579e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/acts_as_audited/auditor.rb
Expand Up @@ -132,8 +132,11 @@ def without_auditing(&block)
def revisions(from_version = 1)
audits = self.audits.where(['version >= ?', from_version])
return [] if audits.empty?
revision = self.audits.find_by_version(from_version).revision
Audit.reconstruct_attributes(audits) {|attrs| revision.revision_with(attrs) }
revisions = []
audits.each do |audit|
revisions << audit.revision
end
revisions
end

# Get a specific revision specified by the version number, or +:previous+
Expand Down

0 comments on commit c26579e

Please sign in to comment.