jsonapi_compliable 0.11.12 → 0.11.13
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: e51276044c4062270de44eda40b761e68de042a6
|
4
|
+
data.tar.gz: eaf59452eafd80b98c3ab1364ad765e9e6d1aae8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4cb12821a1359842eb6c96c617676c1c6f2ba130b7086b3db022f4378fa661bf354b9e5bc7d11f001954d7e5b1812d851cfad6756089c7c72ad77b2f13badb2d
|
7
|
+
data.tar.gz: 230c1750efd1c49d8ea71644bf52de3631bd819e1eb76c7473b27f8da147ab6009cfec2298626b7e810b89117e9398c2d52d2c8c8e243936248af7128127a0fd
|
@@ -58,7 +58,13 @@ module JsonapiCompliable
|
|
58
58
|
parent.association(association_name).loaded!
|
59
59
|
relevant_child = children.find { |c| c.send(foreign_key) == parent.send(primary_key) }
|
60
60
|
next unless relevant_child
|
61
|
-
|
61
|
+
|
62
|
+
# Use private methods because of Rails bug
|
63
|
+
# https://github.com/rails/rails/issues/32886
|
64
|
+
association = parent.association(association_name)
|
65
|
+
association.send(:set_owner_attributes, relevant_child)
|
66
|
+
association.send(:set_inverse_instance, relevant_child)
|
67
|
+
association.send(:target=, relevant_child)
|
62
68
|
end
|
63
69
|
end
|
64
70
|
|