active_interaction 3.5.1 → 3.5.2

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: efaabefa03827c037549d3199559e79028e01014
4
- data.tar.gz: c31b3dfde06e95dd679771e2719300c3ceeb155a
3
+ metadata.gz: c0d9ea988d5cb1324a1cfff2baa3c901eafb47ce
4
+ data.tar.gz: 70ddb30716690e05f11fa65314a609ba61a4633e
5
5
  SHA512:
6
- metadata.gz: e89ce8aa7c3d8ffa79de7720444086a425edc0e287ac0a87d96b5b987bc5275af0c916eef480f59f66b57b0be6c29a0b2c094bb0719de5156d0acb6a7b005bd5
7
- data.tar.gz: cc04bc1579b22405deba56144038f681bbb99b3db413382bc5126a703a761e711fafbc23fb32dca99271472492619dd58ffec5f1b8628e28c71b8a16ac8f4415
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)
@@ -6,5 +6,5 @@ module ActiveInteraction
6
6
  # The version number.
7
7
  #
8
8
  # @return [Gem::Version]
9
- VERSION = Gem::Version.new('3.5.1')
9
+ VERSION = Gem::Version.new('3.5.2')
10
10
  end
@@ -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.1
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-05-12 00:00:00.000000000 Z
12
+ date: 2017-06-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel