abc_jsonapi 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/abc_jsonapi/serializer.rb +4 -2
- data/lib/abc_jsonapi/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: ef48038b2ba006ddb0fe1b53cb96e3623240b7357eb945de3c1ea3b461cfc5ae
|
4
|
+
data.tar.gz: e0011ed1501305346f0ca1291da2383f21ffa6665f0e7d30544939584c76dedd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58e68cc41d35c51b09d6076c8d89151f0441df314acacc76bc1516c07073f0436b5e7f7adc30bd76823e7ec5dbd6810b84e495053c35754621e238525f14b339
|
7
|
+
data.tar.gz: 1e8d1c9564221c3c49cb559274734b73fe4a796af50918726c5abb75b20779fe54b111d89933a35a19cb667a7e02f3d06e4a6e4ffc4db8c475233428eab7ba68
|
data/Gemfile.lock
CHANGED
@@ -27,11 +27,13 @@ module AbcJsonapi
|
|
27
27
|
@resource_attributes = self.class.resource_attributes
|
28
28
|
@relationships = self.class.relationships
|
29
29
|
@virtual_attributes = self.class.virtual_attributes
|
30
|
-
@includes = options[:include]
|
31
|
-
@meta = options[:meta]
|
30
|
+
@includes = options[:include]
|
31
|
+
@meta = options[:meta]
|
32
32
|
end
|
33
33
|
|
34
34
|
def serializable_hash
|
35
|
+
return nil if resource.nil?
|
36
|
+
|
35
37
|
result_hash[:meta] = meta if meta.present?
|
36
38
|
result_hash[:data] = data_hash
|
37
39
|
result_hash[:included] = included_hash if @includes.present?
|
data/lib/abc_jsonapi/version.rb
CHANGED