Permalink
Browse files

Passed: specs/acts_as_audited.rb:225 + 242

Still have to pass specs/acts_as_audited.rb:340
  • Loading branch information...
1 parent 8819b20 commit 77ff9830ea30366d8b44660f4cef6159b2dffa41 @fivetwentysix fivetwentysix committed Sep 2, 2011
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/acts_as_audited/auditor.rb
@@ -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+

0 comments on commit 77ff983

Please sign in to comment.