scoped_serializer 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 15e358c712160fea2d887dfaae7c4e65ee406fde
4
- data.tar.gz: 3527182be7af9dcd647ce89e2e1c80be3e304bce
3
+ metadata.gz: a1c262ae2c53fc81f8d1baee16df7631ad4cb44c
4
+ data.tar.gz: 38eeebff103c7c19fce916eb62aa8f062605a7aa
5
5
  SHA512:
6
- metadata.gz: 70209dd855839e6e5e9ee42af7d8d38ffdd5d62e1ca9d7d798771451058c186115d15bc77a56f74fed416de824b6f9a96f9c93599447766eda742d2c1b8bb677
7
- data.tar.gz: 36805def7e73a315630b86444b8e7a22fb3d69e9fcbf75bc09e898abc35ffffa7deba0bae0b87f8e1ca94d2d370550e78f0594b5f3c7ef7aa60c4f3eb060c3d6
6
+ metadata.gz: 78669d2cdfde3039ee03e12b1567eab0bb623e14c59f6da02f9dcb3e71678689dfd87104857eaa3b3434c1adcf7be6e910f85490b8faa67496bea73fa98d54c3
7
+ data.tar.gz: 12d4c840459a9d39df6b573e697f5363c7c318dcb05820cf7f12a6c87f46a02384b4b7137ac71dc525ca685d99af1d7bac8a25c49e8287311f54877718bc41e8
@@ -95,8 +95,15 @@ module ScopedSerializer
95
95
  #
96
96
  def attributes_hash
97
97
  attributes = @scope.attributes.collect do |attr|
98
- [attr, fetch_property(attr)]
98
+ value = fetch_property(attr)
99
+
100
+ if value.kind_of?(BigDecimal)
101
+ value = value.to_f
102
+ end
103
+
104
+ [attr, value]
99
105
  end
106
+
100
107
  Hash[attributes]
101
108
  end
102
109
 
@@ -1,3 +1,3 @@
1
1
  module ScopedSerializer
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scoped_serializer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arjen Oosterkamp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-20 00:00:00.000000000 Z
11
+ date: 2019-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -189,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  version: '0'
190
190
  requirements: []
191
191
  rubyforge_project:
192
- rubygems_version: 2.4.5
192
+ rubygems_version: 2.5.2.1
193
193
  signing_key:
194
194
  specification_version: 4
195
195
  summary: Scoped serializers for Rails