paper_trail 1.2.13 → 1.2.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -129,7 +129,11 @@ module PaperTrail
129
129
  end
130
130
 
131
131
  def versions_including_current_in_descending_order
132
- v = self.versions.dup
132
+ if self.new_record?
133
+ v = Version.all(:order => 'created_at desc', :conditions => {:item_id => id, :item_type => self.class.name})
134
+ else
135
+ v = self.versions.dup
136
+ end
133
137
  v << Version.new(:event => 'update',
134
138
  :object => object_to_string(self),
135
139
  :created_at => self.updated_at)
data/paper_trail.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{paper_trail}
5
- s.version = "1.2.13"
5
+ s.version = "1.2.14"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Andy Stewart", "Jeremy Weiskotten", "Joe Lind"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paper_trail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.13
4
+ version: 1.2.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Stewart