hyper-resource 1.0.0.lap55 → 1.0.0.lap56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/hyper_record/client_instance_methods.rb +16 -16
- data/lib/hyperloop/resource/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: 586be530e7bc41e9ad2c136efcdfd2b43706a2f8f19b416b7c644bdc1ad343b1
|
4
|
+
data.tar.gz: a243df0faa92f2e25e5e168ad9aeefb9d6cacb7e6b844ec9aeebc7e071af3bf8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f7d3ebb3608f71fff179e4f793dba57dc78f4d3bb0ca77ba6d0be2594e651e22be4396d1078e51eef523cc316145b504a951d3e5a590bd8b3d9f888c4ce0a91
|
7
|
+
data.tar.gz: 971ac4944db9edfa485cd4fca531db61a97b6c7f97757fce52ad169b201219c5cdea19a24a7f0cae4069dd5ce4ec80996f48a0bf6c24b9e773d64e828caf4290
|
@@ -254,22 +254,22 @@ module HyperRecord
|
|
254
254
|
|
255
255
|
def _update_record(data)
|
256
256
|
if data.has_key?(:relation)
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
257
|
+
if data.has_key?(:cause)
|
258
|
+
# this creation of variables for things that could be done in one line
|
259
|
+
# are a workaround for Safari, to get it updating correctly
|
260
|
+
klass_name = data[:cause][:record_type]
|
261
|
+
c_record_class = Object.const_get(klass_name)
|
262
|
+
if c_record_class._record_cache.has_key?(data[:cause][:id].to_s)
|
263
|
+
c_record = c_record_class.find(data[:cause][:id])
|
264
|
+
if `Date.parse(#{c_record.updated_at}) >= Date.parse(#{data[:cause][:updated_at]})`
|
265
|
+
if @fetch_states[data[:relation]] == 'f'
|
266
|
+
if send(data[:relation]).include?(c_record)
|
267
|
+
return
|
268
|
+
end
|
269
|
+
end
|
270
|
+
end
|
271
|
+
end
|
272
|
+
end
|
273
273
|
@fetch_states[data[:relation]] = 'u'
|
274
274
|
send(data[:relation])
|
275
275
|
return
|