activerecord-transactionable 1.0.1 → 1.0.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 425bba67c84cfface5aea1bffede33c953a24608
|
4
|
+
data.tar.gz: d510bc5be8322976b750a62b313ed94f7781f42d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ece1acc4201bbcf111ff7f99a9d0d3472eec54984352607448524a3a36b6e9a5b848df04b8b58b4dbb3c1897120f7bf926b31da7ee79bc52a2482bd5808cfaf
|
7
|
+
data.tar.gz: 78fe06310454e101e14f93ff92256386c0829e7caba1f13b167de80952d5573f1b3fd4402d0ba2b8521da58342d43f030f91043dc67e882279a8af9fd36aeabe
|
@@ -58,8 +58,8 @@ module Activerecord # Note lowercase "r" in Activerecord (different namespace th
|
|
58
58
|
outside_args = extract_args(args, OUTSIDE_TRANSACTION_ERROR_HANDLERS)
|
59
59
|
transaction_open = ActiveRecord::Base.connection.transaction_open?
|
60
60
|
raise ArgumentError, "#{self} does not know how to handle arguments: #{args.keys.inspect}" unless args.keys.empty?
|
61
|
-
if ERRORS_TO_DISALLOW_INSIDE_TRANSACTION.detect { |error| inside_args.values.include?(error) }
|
62
|
-
raise ArgumentError, "#{self} should not rescue #{ERRORS_TO_DISALLOW_INSIDE_TRANSACTION.inspect} inside a transaction: #{
|
61
|
+
if ERRORS_TO_DISALLOW_INSIDE_TRANSACTION.detect { |error| inside_args.values.flatten.uniq.include?(error) }
|
62
|
+
raise ArgumentError, "#{self} should not rescue #{ERRORS_TO_DISALLOW_INSIDE_TRANSACTION.inspect} inside a transaction: #{inside_args.keys.inspect}"
|
63
63
|
end
|
64
64
|
transaction_args = extract_args(args, TRANSACTION_METHOD_ARG_NAMES)
|
65
65
|
if transaction_open
|