jsonapi_compliable 0.11.20 → 0.11.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30a09fe20f0f51315ddb1b52f0c050ddb5cc4a11
4
- data.tar.gz: 5b5a8516804383590b1500ac1ba877bb634d6152
3
+ metadata.gz: ca6a714ac09620228867d66d192bdb5e00ac1770
4
+ data.tar.gz: d2e7ec091c60925bfb404cdf5f755dd123a8d229
5
5
  SHA512:
6
- metadata.gz: c5434f22ea4634aec057f2f20ae551395999bc5b6700487feea5e97a159c30bd329c2d5e88f8421cb6432eddc7705986016d098fb0db4d08ef9f129e77a05d11
7
- data.tar.gz: 96c35a20caa936b37a8d5b731aa0dd2ae50cc23e65a5af3ae033b7f36d13b26f8ffd2cc87fc3e2e95c53bd2803bc4296348d2dfaa99733bc2cc9bec9f6512c9a
6
+ metadata.gz: df26b799088d05865d3a6c9b3cbfee738b46a7242f23318cf426a9c18c765635526ae7fcf5fd03395c003a3c036f21f58756bf0b1056e95b225dc5312afb49aa
7
+ data.tar.gz: 8ad6084d7b8460193125e59669edcb9589d6c36b03719afb8b7fb814546d41d9612224c2d5567c20b933df304514b41edd8cc4cf420210b8a3c6ea8fe2c35fa8
@@ -32,6 +32,14 @@ else
32
32
  require 'jsonapi/serializable'
33
33
  end
34
34
 
35
+ # Temporary fix until fixed upstream
36
+ # https://github.com/jsonapi-rb/jsonapi-serializable/pull/102
37
+ JSONAPI::Serializable::Resource.class_eval do
38
+ def requested_relationships(fields)
39
+ @_relationships
40
+ end
41
+ end
42
+
35
43
  require "jsonapi_compliable/extensions/extra_attribute"
36
44
  require "jsonapi_compliable/extensions/boolean_attribute"
37
45
  require "jsonapi_compliable/extensions/temp_id"
@@ -288,7 +288,11 @@ module JsonapiCompliable
288
288
  opts = default_jsonapi_render_options.merge(opts)
289
289
  opts = Util::RenderOptions.generate(scope, query_hash, opts)
290
290
  opts[:expose][:context] = self
291
- opts[:include] ||= deserialized_params.include_directive if force_includes?
291
+
292
+ if opts[:include].empty? && force_includes?
293
+ opts[:include] = deserialized_params.include_directive
294
+ end
295
+
292
296
  perform_render_jsonapi(opts)
293
297
  end
294
298
 
@@ -1,3 +1,3 @@
1
1
  module JsonapiCompliable
2
- VERSION = "0.11.20"
2
+ VERSION = "0.11.21"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi_compliable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.20
4
+ version: 0.11.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lee Richmond
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-06-11 00:00:00.000000000 Z
12
+ date: 2018-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jsonapi-serializable