remote_record 0.9.3 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/remote_record/collection.rb +4 -2
- data/lib/remote_record/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6195e3ad6e5c63b1530d5095ed625ce175e8159c55f1a6e62951494a0437cb4e
|
4
|
+
data.tar.gz: 77f9c737aada2d4482ac135a615eaeefede9bd8e251eb85fec1c471c2946e86c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9d19935c0daea74f1bc1acc82369d0f091a9663e5f01fb8947202dd078a829ff59c852a39be4f2b544177eec4fb959e2c8ba5649755edcb1815f6d7defe4b80
|
7
|
+
data.tar.gz: 7f61f43a6b73734ddc22b9fbf13ec43c2761e3f99d7a0a8e0da35766492a57253f5fd981469fae93d189ebc859a0e43cee59c4bf114514995f2d2a244bcc3f1c
|
@@ -42,9 +42,11 @@ module RemoteRecord
|
|
42
42
|
prefetched_record = response.find do |resource|
|
43
43
|
yield(resource).to_s == record.public_send(@id_field).remote_resource_id
|
44
44
|
end
|
45
|
-
|
45
|
+
next nil unless prefetched_record.present?
|
46
|
+
|
47
|
+
record.remote.attrs = prefetched_record
|
46
48
|
record
|
47
|
-
end
|
49
|
+
end.compact
|
48
50
|
end
|
49
51
|
|
50
52
|
def match_remote_resources_by_id(response)
|