skinny_controllers 0.5.4 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/skinny_controllers/json_api_document.rb +2 -2
- data/lib/skinny_controllers/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 419e3bc9c106e0b57c32825a4a18ff5c694c9804
|
4
|
+
data.tar.gz: 3bb9c41ea1e44ad8ff34d937b6f6dcbfe2dc3302
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c7d72792ecf3144feec8dee69a2cb130c37ed168109dae026c52c65c2ca3c6275320acb4668c5a338b6450b9299a0d3f34fb82f35f525f549cb3af520731288
|
7
|
+
data.tar.gz: 545806ac926d754f67770ed11266d17b8518d0dcec901c329a641ceac9c4aa2d417c03faab42d37269c142e8add81aeac6745b7590df9f453478dde45fd7ba83
|
@@ -10,7 +10,7 @@ module SkinnyControllers
|
|
10
10
|
json = JSON.parse(json) if json.is_a?(String)
|
11
11
|
|
12
12
|
self.data = json['data']
|
13
|
-
self.id = data['id']
|
13
|
+
self.id = json['id'] || data['id']
|
14
14
|
self.attributes = format_keys(data['attributes'], key_formatter)
|
15
15
|
end
|
16
16
|
|
@@ -20,7 +20,7 @@ module SkinnyControllers
|
|
20
20
|
def format_keys(hash, key_format_method)
|
21
21
|
return hash unless key_format_method
|
22
22
|
|
23
|
-
hash.each_with_object({}) do |(k, v), result|
|
23
|
+
hash.each_with_object({}) do | (k, v), result |
|
24
24
|
new_key = k.send(key_format_method)
|
25
25
|
result[new_key] = v
|
26
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skinny_controllers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- L. Preston Sego III
|
@@ -227,5 +227,5 @@ rubyforge_project:
|
|
227
227
|
rubygems_version: 2.4.8
|
228
228
|
signing_key:
|
229
229
|
specification_version: 4
|
230
|
-
summary: SkinnyControllers-0.5.
|
230
|
+
summary: SkinnyControllers-0.5.5
|
231
231
|
test_files: []
|