error_merger 0.3.2 → 0.3.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
- SHA1:
3
- metadata.gz: 1dc0867bdb240f44bc025182673c85b9d489d13d
4
- data.tar.gz: b4a2ea866f2f9226d9424c8eb1b6d4d2793ec22d
2
+ SHA256:
3
+ metadata.gz: 8c35e4e2ae8eef848df65fefdfcb904d9445d339c8fb6d60eb19d4160aefd701
4
+ data.tar.gz: 1b93fb6bfd6263a46d0f6c80541c52f490f8725da258fa44b7829a2ee2819591
5
5
  SHA512:
6
- metadata.gz: 06ce9d7692a852ed593138f49024bebaece2c4b1619cbfcb4b72777664d7c95cc62a4a861200062828a4a8ccb70f5e39c0399e22bfca9b1a89fb4af5ac0cc5bb
7
- data.tar.gz: c3f5202bd15d1920766624c8e9fd12030cad3a30cef4f6d046e3f81549b3a3457e9c968698d0541a44a019392efa0d84c1f27c8405a26757ebcab4408ecbeec5
6
+ metadata.gz: df19dc0542f489bbcba21ebb799aee4f4b2ed9a690b1b2890a4ba676717d0bf7e8b980583cf0d0a9306c92980973f227e8d2f696bf72f54fabd5e0f6454a4a40
7
+ data.tar.gz: acae8c5ea6186c23053aa80e9ed3c34070f4ba4d253a37f97f4206de29816fb80b7668e30c19c7759ca9b3dba57c60000ba86ea0f864349ab4c9a5c1d3a82c19
@@ -5,7 +5,7 @@ module ErrorMerger
5
5
  # @user.errors.merge @account, "Account ##{@account.id}: "
6
6
  def merge(association, prefix=nil)
7
7
  if association.errors.respond_to? :full_message
8
- prefix ||= "#{association.class.model_name.human}: "
8
+ prefix ||= "#{association.errors.instance_variable_get(:@base).class.model_name.human}: "
9
9
  association.errors.each do |attr, error|
10
10
  add :base, "#{prefix}#{association.errors.full_message(attr, error)}"
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module ErrorMerger
2
- VERSION = '0.3.2'
2
+ VERSION = '0.3.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: error_merger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-13 00:00:00.000000000 Z
11
+ date: 2018-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  version: '0'
96
96
  requirements: []
97
97
  rubyforge_project:
98
- rubygems_version: 2.6.10
98
+ rubygems_version: 2.7.6
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: Enhances the Error class on ActiveModel-compliant models