api_resource 0.6.9 → 0.6.10

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- api_resource (0.6.8)
4
+ api_resource (0.6.10)
5
5
  colorize
6
6
  differ
7
7
  json
@@ -191,7 +191,7 @@ module ApiResource
191
191
 
192
192
  def write_attribute(name, val)
193
193
  old_val = read_attribute(name)
194
- new_val = self.typecast_attribute(name, val)
194
+ new_val = val.nil? ? nil : self.typecast_attribute(name, val)
195
195
 
196
196
  unless old_val == new_val
197
197
  self.send("#{name}_will_change!")
@@ -247,7 +247,7 @@ module ApiResource
247
247
  val = self.default_value_for_field(field)
248
248
  end
249
249
  # now we typecast
250
- val = self.typecast_attribute(field, val)
250
+ val = val.nil? ? nil : self.typecast_attribute(field, val)
251
251
  return @attributes_cache[field.to_sym] = val
252
252
  end
253
253
  end
@@ -1,3 +1,3 @@
1
1
  module ApiResource
2
- VERSION = "0.6.9"
2
+ VERSION = "0.6.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.9
4
+ version: 0.6.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: