fields-serializer 0.8.0 → 0.8.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2d7eea1eae67d97344677c9e9f61551ac51d688
|
4
|
+
data.tar.gz: bfd9e2424562e069e9c4c7ae27e87efe3863a3b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4eff770dc241f46ef6cee15ded813831ad787ed203b03eeeac7ad7e201ac96967548f7c082cedc29db8eed9942c8eb8b92a3b06e12673ff8a52a0ebe51763821
|
7
|
+
data.tar.gz: a345685413e0901005840df3dc1dbef0d0c1399950763b1dfef29fd57ad76a8456628b4b2efba0afe1b86fe91fa346be6227b9068b77fd4b490f49066729014b
|
@@ -42,7 +42,7 @@ module Fields
|
|
42
42
|
# { "xxx-xxxxxxxx-xxx-xxxxxx" => { name: ["can't be blank"], age: ["can't be less than 18"] },
|
43
43
|
# "0" => { name: ["can't be blank"], age: ["can't be less than 18"] },
|
44
44
|
def __associate_errors(associate)
|
45
|
-
if associate.is_a?(
|
45
|
+
if associate.is_a?(ActiveRecord::Associations::CollectionProxy)
|
46
46
|
associate.map.with_index { |object, i| [object.id || i, object.errors.to_h] }.to_h
|
47
47
|
else
|
48
48
|
associate.errors.to_h
|