jsonapi_responses 1.1.0 → 1.1.1
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_responses/respondable.rb +2 -1
- data/lib/jsonapi_responses/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: '066548a9ebf27a83035e88ae033d84a8aee310cb6ee13fb4e789498ebdfa5d72'
|
|
4
|
+
data.tar.gz: 8714c314df3e5125f56cfd79119dc5acbdf1aaa66583dce4ed6e74faa13ca25c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d2c2603d5d6f1cf28211af7742f22954562b84283d2818f1bfab517e305b5aa86bf2a7f5214e2b9c8e1d558371f8d440b138a58086faa4d814d4cfd22f5e476a
|
|
7
|
+
data.tar.gz: db9adb8eb6635f91fd5d18595285d7d42dc1f4aac13be52d4471f572a5404defe6abde66d816b51f68357ff78587241026a2509d5ae86a864848d00a5ead5869
|
|
@@ -165,7 +165,8 @@ module JsonapiResponses
|
|
|
165
165
|
def render_with(record, options = {})
|
|
166
166
|
action = options[:action] || action_name.to_sym
|
|
167
167
|
context = (options[:context] || {}).merge(serialization_user)
|
|
168
|
-
|
|
168
|
+
# Only use params[:view] if view is not already provided in context
|
|
169
|
+
context[:view] ||= params[:view]&.to_sym
|
|
169
170
|
serializer_class = options[:serializer] || "#{controller_name.singularize.camelize}Serializer".constantize
|
|
170
171
|
|
|
171
172
|
# If a custom responder is provided, use it
|