skinny_controllers 0.5.4 → 0.5.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37c23f99827b6f219c4d8c9639047679d50e71c5
4
- data.tar.gz: ba943a28a5d56c8f61245d70466fbf071aeb1c98
3
+ metadata.gz: 419e3bc9c106e0b57c32825a4a18ff5c694c9804
4
+ data.tar.gz: 3bb9c41ea1e44ad8ff34d937b6f6dcbfe2dc3302
5
5
  SHA512:
6
- metadata.gz: f17ce4c443b039f831b12eee469de045571fc963aa5f0657363965773427dec8476ea61a9e55cdebdbae8836e3d7d2c0d01ef546d8bbed10cc4e4e69f8d4ee4a
7
- data.tar.gz: 3bd1b95c27f8b5fce730bfb7caafa2adf90e1a3b2a9ea0d418baa0411c89dc898cd1ad42a1fdbb186acbd7d20b2d85d9f9f97bfeb09cd5a9553223884bbad4e1
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
@@ -1,3 +1,3 @@
1
1
  module SkinnyControllers
2
- VERSION = '0.5.4'
2
+ VERSION = '0.5.5'
3
3
  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
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.4
230
+ summary: SkinnyControllers-0.5.5
231
231
  test_files: []