jsonapi_compliable 0.6.6 → 0.6.7
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/jsonapi_compliable/deserializer.rb +4 -3
- data/lib/jsonapi_compliable/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9f46b94a397759f05cd7537d79b05e67ca9fd20c
|
|
4
|
+
data.tar.gz: a35204dce94ff15fee19a052f95e12c6c44ad414
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 351229549de82a6e3e1e448018adf10135c603200a9ff14a859d6fc3bf2a5a0b117a5d488abfc757a353c6aa719d4b286e0d6c6c06c4a4813ab44730598acd3b
|
|
7
|
+
data.tar.gz: 446f344728c8ec9fe881dd84db1e017b8c7cc51c91cf9730192111a8e9d8c768fcbf83a535892be69c878a9aafece275f1a6a7d6fb09e533c77d028bed4faf08
|
|
@@ -65,7 +65,7 @@ class JsonapiCompliable::Deserializer
|
|
|
65
65
|
# @return [Hash] the raw :attributes hash + +id+
|
|
66
66
|
def attributes
|
|
67
67
|
@attributes ||= raw_attributes.tap do |hash|
|
|
68
|
-
hash
|
|
68
|
+
hash[:id] = id if id
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
@@ -191,13 +191,14 @@ class JsonapiCompliable::Deserializer
|
|
|
191
191
|
attributes = included_object[:attributes] || {}
|
|
192
192
|
attributes[:id] = datum[:id] if datum[:id]
|
|
193
193
|
relationships = process_relationships(included_object[:relationships] || {})
|
|
194
|
-
|
|
194
|
+
method = datum[:method]
|
|
195
|
+
method = method.to_sym if method
|
|
195
196
|
|
|
196
197
|
{
|
|
197
198
|
meta: {
|
|
198
199
|
jsonapi_type: datum[:type],
|
|
199
200
|
temp_id: temp_id,
|
|
200
|
-
method:
|
|
201
|
+
method: method
|
|
201
202
|
},
|
|
202
203
|
attributes: attributes,
|
|
203
204
|
relationships: relationships
|