Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Passed: specs/acts_as_audited.rb:225 + 242

Still have to pass specs/acts_as_audited.rb:340
  • Loading branch information...
commit 77ff9830ea30366d8b44660f4cef6159b2dffa41 1 parent 8819b20
@fivetwentysix fivetwentysix authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/acts_as_audited/auditor.rb
View
7 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+
Please sign in to comment.
Something went wrong with that request. Please try again.