dulead-jsonapi-serializer 2.2.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fast_jsonapi/relationship.rb +6 -1
- data/lib/jsonapi/serializer/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: b25b6a052fc6903eec07a319e0bd78f084d3f5751b6855048f4272595530698c
|
4
|
+
data.tar.gz: d45e2370681ff7bcd4e3dafed3ccf250a7c3bef93bef7db9f0f5b1177ca58d9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0086eeceeaac064a62899540cfd615593aafb35a81dfe2e91e317d067e71bf8f4e8425fa2b4a8632ad673bd351691825cac9c3e41c5b54ab762e6589c5382f2
|
7
|
+
data.tar.gz: 190c3d2d1cf37929aa3b36a26b2e7d164f467258787caf95345d953682fab2b7e2bc805dbe83a298bcd7919e4a0f2eadea207d76ed113cdeea2f64d35b2c6ee7
|
@@ -220,7 +220,12 @@ module FastJsonapi
|
|
220
220
|
|
221
221
|
# if not, use the record type of the serializer, and memoize the transformed version
|
222
222
|
serializer = serializer_for(record, serialization_params)
|
223
|
-
|
223
|
+
# if the serializer has record_type_block -> use it instead
|
224
|
+
if serializer.record_type_block.present?
|
225
|
+
@record_types_for[serializer] ||= serializer.record_type_block.call(record)
|
226
|
+
else
|
227
|
+
@record_types_for[serializer] ||= run_key_transform(serializer.record_type)
|
228
|
+
end
|
224
229
|
end
|
225
230
|
|
226
231
|
def compute_static_record_type
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dulead-jsonapi-serializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JSON:API Serializer Community
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|