remote_record 0.9.2 → 0.10.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/base.rb +1 -0
- data/lib/remote_record/collection.rb +4 -2
- data/lib/remote_record/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1c720779bdc51677aa64f2b7cffe72a50bea619929b147ffca2c45e5fe3a9f7
|
4
|
+
data.tar.gz: a81b858886378e8ce10ef050e1dee0bf13dc8c86c906b732871d15082ea2681e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbe00ce5701e5bc9b0de1ee6f0320079076e3dd30f7c40ae4283be75275411110fe5575fdb84fd4ed7a5d09a1f61f59ead3b7e5a9b0e32ff398737df5208a654
|
7
|
+
data.tar.gz: 856479b0661b3ccb3f0ca6a971610c69ce5073c6157d60d7228f2db27d7d25607d0b81c47275eaa715f59dddb831901faf72ffa68db4531f6f76d5609a65b621
|
data/lib/remote_record/base.rb
CHANGED
@@ -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)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: remote_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Fish
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-10-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|