jsonapi-params 0.1.1 → 0.1.2

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: 92819e75d15e69fa8dcd009b18abce677dc7be0c
4
- data.tar.gz: bbe111be0cc21b32c77a24e79a9910cba212cf48
3
+ metadata.gz: de9116b1bef0c70f1bb9f7212643d3cc3e5f0604
4
+ data.tar.gz: 12a615d655fc3c48f83e6b76da34c5a5a6553291
5
5
  SHA512:
6
- metadata.gz: 7c48709bde4a2244475ddd033c4a098ee5d88599750e4ae7e60822ae9fc5060eca91f6e551b05c7abdd5b23ddafef5f928aa801489b7fd32441122d8860f6c01
7
- data.tar.gz: 6d5b048a3b90cd016ee27fe3028273217711e91fdf4673bcf6c66a5fc95cdf427bc5bfed853fdb11d15e4220d17fe488c8690613e5c4ad0790b20718a02475f0
6
+ metadata.gz: feb7542e2522a61504eb40864eae68bff92326ae1c6cdb342ed6dce963be259042e29e0abef51c4a36e4f226998b4723632d70e66312900633a7b3ba6ec26b9b
7
+ data.tar.gz: 3648e73135005676a49c36d65910b6312cf012530d79b3e83139b43f2d1108c6fe405c6c1fa52865e99510d0fe450126a384bf06d88bddaec587cc15489e03bb
data/CHANGELOG.md CHANGED
@@ -1,9 +1,13 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.1.2
4
+
5
+ * Fix attributes and relationships to force convert rails parameters to a hash.
6
+
3
7
  ## 0.1.1
4
8
 
5
- * Change attributes and relationships to allow underscore and dasherize values
9
+ * Change attributes and relationships to allow underscore and dasherize values.
6
10
 
7
11
  ## 0.1.0
8
12
 
9
- * Initial version with attributes and relationships
13
+ * Initial version with attributes and relationships.
@@ -83,7 +83,7 @@ module JSONAPI
83
83
  attributes = attributes.slice(*self.class.whitelist_attributes)
84
84
  attributes = attributes.merge(relationships)
85
85
 
86
- attributes.inject({}) do |attributes, (key, value)|
86
+ attributes.to_h.inject({}) do |attributes, (key, value)|
87
87
  attributes[key.to_s.underscore.to_sym] = value
88
88
  attributes
89
89
  end
@@ -97,7 +97,7 @@ module JSONAPI
97
97
  relationships = @data['relationships'] || {}
98
98
  relationships = relationships.slice(*self.class.whitelist_relationships)
99
99
 
100
- relationships.inject({}) do |relationships, (relationship_key, relationship_object)|
100
+ relationships.to_h.inject({}) do |relationships, (relationship_key, relationship_object)|
101
101
  data = relationship_object['data']
102
102
 
103
103
  if data.is_a?(Array)
@@ -1,5 +1,5 @@
1
1
  module JSONAPI
2
2
  module Param
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi-params
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Noverde Team