activerecord_snapshot_view 0.11.1 → 0.11.2
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/VERSION +1 -1
- data/lib/activerecord_snapshot_view/snapshot_view.rb +9 -5
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.11.
|
1
|
+
0.11.2
|
@@ -53,6 +53,14 @@ module ActiveRecord
|
|
53
53
|
def initialize(cause=nil)
|
54
54
|
@cause = cause
|
55
55
|
end
|
56
|
+
|
57
|
+
def message
|
58
|
+
(@cause.message if @cause) || "SaveWork"
|
59
|
+
end
|
60
|
+
|
61
|
+
def backtrace
|
62
|
+
(@cause.backtrace if @cause) || super
|
63
|
+
end
|
56
64
|
end
|
57
65
|
|
58
66
|
module ClassMethods
|
@@ -264,11 +272,7 @@ module ActiveRecord
|
|
264
272
|
r
|
265
273
|
rescue SaveWork => e
|
266
274
|
advance_version
|
267
|
-
|
268
|
-
raise e.cause
|
269
|
-
else
|
270
|
-
raise e
|
271
|
-
end
|
275
|
+
raise e # raise the SaveWork again, in case we are inside nested new_versions
|
272
276
|
ensure
|
273
277
|
self.active_working_table_name = nil
|
274
278
|
end
|