remote_record 0.9.1 → 0.9.2
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 +3 -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: ffa98f2c80cd8bb5cf1c297a30e878a09a056daa139d8109a7179d9076c56f21
|
4
|
+
data.tar.gz: df9f87372e8ad4e348db5980acfd7912ed9cbd91fd4c06f18718627b58357c31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f522c6b252935a1340de6ea9ebdc6a8825610199a71ecbdfb6cbc4de9202167d34326b239bed5b80f14cca2353572a7af96d7f61a703d4dd746056ed6111e99
|
7
|
+
data.tar.gz: b5875964305b1cad3a96765f5e0e19714032d47c093701c63ededd93e9aaa7389c907fcfc4d7949588fa6f8a6a3103d7cfb5074714de1ddd18cb29d4b59a8d6a
|
@@ -39,9 +39,10 @@ module RemoteRecord
|
|
39
39
|
|
40
40
|
def match_remote_resources(response)
|
41
41
|
@relation.map do |record|
|
42
|
-
|
42
|
+
prefetched_record = response.find do |resource|
|
43
43
|
yield(resource).to_s == record.public_send(@id_field).remote_resource_id
|
44
|
-
end
|
44
|
+
end
|
45
|
+
record.remote.attrs = prefetched_record if prefetched_record.present?
|
45
46
|
record
|
46
47
|
end
|
47
48
|
end
|