mongomodel 0.2.19 → 0.2.20

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,7 @@ module MongoModel
27
27
  end
28
28
 
29
29
  def before_type_cast(key)
30
- values_before_typecast[key] || self[key]
30
+ values_before_typecast[key].presence || self[key]
31
31
  end
32
32
 
33
33
  private
@@ -1,3 +1,3 @@
1
1
  module MongoModel
2
- VERSION = "0.2.19"
2
+ VERSION = "0.2.20"
3
3
  end
@@ -165,7 +165,7 @@ module MongoModel
165
165
  :string => [ "abc", 123 ],
166
166
  :integer => [ 123, 55.123, "999", "12.123" ],
167
167
  :float => [ 55.123, 123, "12.123" ],
168
- :boolean => [ true, false, "true", "false", 1, 0, "1", "0", '' ],
168
+ :boolean => [ true, false, "true", "false", 1, 0, "1", "0" ],
169
169
  :symbol => [ :some_symbol, "some_string" ],
170
170
  :hash => [ { :foo => 'bar' } ],
171
171
  :array => [ [123, 'abc', :foo, true] ],
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongomodel
3
3
  version: !ruby/object:Gem::Version
4
- hash: 49
4
+ hash: 63
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 19
10
- version: 0.2.19
9
+ - 20
10
+ version: 0.2.20
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sam Pohlenz
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-01-07 00:00:00 +10:30
18
+ date: 2011-01-08 00:00:00 +10:30
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency