mongoid-time_with_named_zone 0.1.3 → 0.1.4

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: ba035ad698cb10c257f58a4684943682e5d85d4e
4
- data.tar.gz: 544956176d75ee0b7714e243ad76fb7af67cc15a
3
+ metadata.gz: 47c61ecde1e0577a2e05de0fd9eec9fcc5d88826
4
+ data.tar.gz: dba4846f6b9cbac1566827f62da6f99095060676
5
5
  SHA512:
6
- metadata.gz: 52c92d80709ec0e5a193e9348c0b1bd2b4099a2790c9dacf92cdef7896df93eb48b8c78b7e1ce9b149f4ba41784b1c392e046912b6052dcca0b52c7a5575f627
7
- data.tar.gz: ad0af86d9710484f3a27928cc481bad6e2b083aa28dbad1b97678588a9d5a84f8d7595b61ec25d2bb50cea04e70a04417e2fe0c22e819d6bcc7d9f694b6158c1
6
+ metadata.gz: 1aa8c656e02b29a268e230246d3016f4cc5166bb2afe975de582bb673c7eb7c5222bddff0fce61b922abfad7e5bff63e5a70f8a012f283cb96450a50d74db7e4
7
+ data.tar.gz: e57395d13a27a7f28d6cc7efefb5f7c4be2c080da58deaa2f0135a325e2df4c8050724885d83c30bb4903b42f027ec77ab3e58a8a85c2d08f108d443fc2f5e25
@@ -20,7 +20,8 @@ module Mongoid
20
20
  # Get the object as it was stored in the database, and instantiate`
21
21
  # this custom class from it.
22
22
  def demongoize(object)
23
- object[:time].in_time_zone(object[:zone]) if object
23
+ return nil unless object && object[:time] && object[:zone]
24
+ object[:time].in_time_zone(object[:zone])
24
25
  end
25
26
 
26
27
  def mongoize(object)
@@ -1,5 +1,5 @@
1
1
  module Mongoid
2
2
  class TimeWithNamedZone
3
- VERSION = '0.1.3'.freeze
3
+ VERSION = '0.1.4'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-time_with_named_zone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carnival Mobile