paper_trail 1.2.13 → 1.2.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/paper_trail/has_paper_trail.rb +5 -1
- data/paper_trail.gemspec +1 -1
- metadata +1 -1
@@ -129,7 +129,11 @@ module PaperTrail
|
|
129
129
|
end
|
130
130
|
|
131
131
|
def versions_including_current_in_descending_order
|
132
|
-
|
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.
|
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"]
|