activerecord-transactionable 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45ff61a88a97f5e887d2782237e27bf2ea65075c
|
4
|
+
data.tar.gz: f6706016a55fcb7eb575c4957168d118a39bbc7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21ec04bb084c2e7bbb52b1c68c0861e3bb2feb0f9e1141bbf1c6961990fd2f85d4bdfa1e2573b59519e5b5693b57db6a3f7e8e7962ad8e8f664af0061e56f8b2
|
7
|
+
data.tar.gz: 02d33ee1345a027f51b75139a4408ffda9c9426a59c0316525cbdfa01089ea37b1174426199216b80c2bffefac91f240ae74c01b2e039cfa39038c098f4f110a
|
@@ -30,6 +30,7 @@ module Activerecord # Note lowercase "r" in Activerecord (different namespace th
|
|
30
30
|
:isolation,
|
31
31
|
:joinable
|
32
32
|
].freeze
|
33
|
+
REQUIRES_NEW = TRANSACTION_METHOD_ARG_NAMES[0]
|
33
34
|
INSIDE_TRANSACTION_ERROR_HANDLERS = [
|
34
35
|
:rescued_errors,
|
35
36
|
:prepared_errors,
|
@@ -63,8 +64,8 @@ module Activerecord # Note lowercase "r" in Activerecord (different namespace th
|
|
63
64
|
end
|
64
65
|
transaction_args = extract_args(args, TRANSACTION_METHOD_ARG_NAMES)
|
65
66
|
if transaction_open
|
66
|
-
unless transaction_args[
|
67
|
-
transaction_args[
|
67
|
+
unless transaction_args[REQUIRES_NEW]
|
68
|
+
transaction_args[REQUIRES_NEW] = true
|
68
69
|
logger.warn("[#{self}.transaction_wrapper] Opening a nested transaction. Setting require_new: true")
|
69
70
|
else
|
70
71
|
logger.debug("[#{self}.transaction_wrapper] Will start a nested transaction.")
|