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 +5 -5
- data/lib/error_merger/error_merger.rb +1 -1
- data/lib/error_merger/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8c35e4e2ae8eef848df65fefdfcb904d9445d339c8fb6d60eb19d4160aefd701
|
4
|
+
data.tar.gz: 1b93fb6bfd6263a46d0f6c80541c52f490f8725da258fa44b7829a2ee2819591
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/error_merger/version.rb
CHANGED
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.
|
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:
|
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
|
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
|