active_interaction 3.5.1 → 3.5.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 +4 -4
- data/lib/active_interaction/errors.rb +1 -1
- data/lib/active_interaction/version.rb +1 -1
- data/spec/active_interaction/errors_spec.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0d9ea988d5cb1324a1cfff2baa3c901eafb47ce
|
4
|
+
data.tar.gz: 70ddb30716690e05f11fa65314a609ba61a4633e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 232fdf439bb14b719903140fd7da05339a98ea7d926e9540ee65333ec2e6d3889676b94194b3e3de3fa5311fa55363a5e88a43828deace94ec1a49d2438e60dd
|
7
|
+
data.tar.gz: 7f0125b70ae502bcb5b891d71b613cedb8321d046c5730f4e559c3d9f81c36986492085b06fef341514f8860fcf9ed7b711808a7a09769370273d293c3182364
|
@@ -126,7 +126,7 @@ module ActiveInteraction
|
|
126
126
|
end
|
127
127
|
|
128
128
|
def merge_detail!(other, attribute, detail, error)
|
129
|
-
if attribute?(attribute)
|
129
|
+
if attribute?(attribute) || attribute == :base
|
130
130
|
add(attribute, error, detail) unless added?(attribute, error, detail)
|
131
131
|
else
|
132
132
|
translated_error = translate(other, attribute, error)
|
@@ -68,6 +68,17 @@ describe ActiveInteraction::Errors do
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
+
context 'that is a symbol on base' do
|
72
|
+
before do
|
73
|
+
other.add(:base)
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'adds the error' do
|
77
|
+
errors.merge!(other)
|
78
|
+
expect(errors.details[:base]).to eql [{ error: :invalid }]
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
71
82
|
context 'that is a string' do
|
72
83
|
let(:message) { SecureRandom.hex }
|
73
84
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_interaction
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Lasseigne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-06-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|