jsonapi_parameters 0.3.3 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jsonapi_parameters/translator.rb +5 -1
- data/lib/jsonapi_parameters/version.rb +1 -1
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a339d9b7223b9c6d96f89b3717c0dd6d2498bcb8d9af26cc332a3e34ec56223
|
4
|
+
data.tar.gz: df89b0788c62e1e70881f87164af344325713778d0e318087464ae842762ed45
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4347b54d8f0950cb04e10ab0f1fbc4ca34864f22169914f25069cf31170471a7e4efd4d218be7e72b2efa0055c93ce1f859026736e719f37dfd9683a79af9d3e
|
7
|
+
data.tar.gz: 3555976c98bfab57d81b227844b1c7a7a359b73a02833db1496ba8177ac8e78825ec69f13bace62249ae165f5803ad9f5e8aca18320674fe50b4b4f09d5f1b88
|
@@ -51,7 +51,11 @@ module JsonApi::Parameters
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def jsonapi_unsafe_params
|
54
|
-
@jsonapi_unsafe_params ||= @jsonapi_unsafe_hash.dig(:data, :attributes) || {}
|
54
|
+
@jsonapi_unsafe_params ||= (@jsonapi_unsafe_hash.dig(:data, :attributes) || {}).tap do |param|
|
55
|
+
id = @jsonapi_unsafe_hash.dig(:data, :id)
|
56
|
+
|
57
|
+
param[:id] = id if id.present?
|
58
|
+
end
|
55
59
|
end
|
56
60
|
|
57
61
|
def jsonapi_included
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonapi_parameters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Visuality
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-10-
|
12
|
+
date: 2019-10-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -207,6 +207,20 @@ dependencies:
|
|
207
207
|
- - "~>"
|
208
208
|
- !ruby/object:Gem::Version
|
209
209
|
version: '1.5'
|
210
|
+
- !ruby/object:Gem::Dependency
|
211
|
+
name: loofah
|
212
|
+
requirement: !ruby/object:Gem::Requirement
|
213
|
+
requirements:
|
214
|
+
- - "~>"
|
215
|
+
- !ruby/object:Gem::Version
|
216
|
+
version: 2.3.1
|
217
|
+
type: :development
|
218
|
+
prerelease: false
|
219
|
+
version_requirements: !ruby/object:Gem::Requirement
|
220
|
+
requirements:
|
221
|
+
- - "~>"
|
222
|
+
- !ruby/object:Gem::Version
|
223
|
+
version: 2.3.1
|
210
224
|
- !ruby/object:Gem::Dependency
|
211
225
|
name: factory_bot
|
212
226
|
requirement: !ruby/object:Gem::Requirement
|
@@ -277,6 +291,20 @@ dependencies:
|
|
277
291
|
- - "~>"
|
278
292
|
- !ruby/object:Gem::Version
|
279
293
|
version: 0.4.2
|
294
|
+
- !ruby/object:Gem::Dependency
|
295
|
+
name: sprockets
|
296
|
+
requirement: !ruby/object:Gem::Requirement
|
297
|
+
requirements:
|
298
|
+
- - "<"
|
299
|
+
- !ruby/object:Gem::Version
|
300
|
+
version: '4'
|
301
|
+
type: :development
|
302
|
+
prerelease: false
|
303
|
+
version_requirements: !ruby/object:Gem::Requirement
|
304
|
+
requirements:
|
305
|
+
- - "<"
|
306
|
+
- !ruby/object:Gem::Version
|
307
|
+
version: '4'
|
280
308
|
description: JsonApi::Parameters allows you to easily translate JSON:API compliant
|
281
309
|
parameters to a structure expected by Rails.
|
282
310
|
email:
|