Browse files

Removed logic that seems unnecessary (and incorrect) in retrospect.

  • Loading branch information...
1 parent 1e49a1e commit 0867a3f5007f59c32c774fce2a541d3e76e700a6 Jeremy Weiskotten committed Feb 14, 2010
Showing with 3 additions and 5 deletions.
  1. +3 −5 lib/paper_trail/has_paper_trail.rb
View
8 lib/paper_trail/has_paper_trail.rb
@@ -155,12 +155,10 @@ def differences(before, after)
end
end
+ # Returns all versions, newest first, including a pseudo-version that
+ # represents the current version of the entity.
def versions_including_current_in_descending_order
- if self.new_record?
- v = Version.all(:order => 'created_at desc', :conditions => {:item_id => id, :item_type => self.class.name})
- else
- v = self.versions.dup
- end
+ v = self.versions.dup
v << Version.new(:event => 'update',
:object => object_to_string(self),
:created_at => self.updated_at)

0 comments on commit 0867a3f

Please sign in to comment.