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 CHANGED
@@ -1 +1 @@
1
- 0.11.1
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
- if e.cause
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
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 11
8
- - 1
9
- version: 0.11.1
8
+ - 2
9
+ version: 0.11.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - mccraig mccraig of the clan mccraig