RubyGems
npm
Organizations
Log in
Sign up
RubyGems
mongoid-friendly-timestamps
Versions diffs
0.0.2 → 0.0.3
mongoid-friendly-timestamps 0.0.2 → 0.0.3
Sign up to get
free
protection for your applications and to get access to all the features.
Files changed (3)
hide
show
data/lib/mongoid-friendly-timestamps.rb
+2
-2
data/lib/mongoid-friendly-timestamps/version.rb
+1
-1
metadata
+1
-1
data/lib/mongoid-friendly-timestamps.rb
CHANGED
Viewed
@@ -23,8 +23,8 @@ module Mongoid
23
23
end
24
24
25
25
define_method "#{raw_name}=" do |value|
26
-
utc
= value.
utc
27
-
self[raw_name] =
utc.to_f
26
+
value
= value.
to_f unless value.is_a? Float
27
+
self[raw_name] =
value
28
28
self.send update_friendly_field_method_name
29
29
end
30
30
data/lib/mongoid-friendly-timestamps/version.rb
CHANGED
Viewed
@@ -1,7 +1,7 @@
1
1
module Mongoid
2
2
module Friendly
3
3
module Timestamps
4
-
VERSION = "0.0.
2
"
4
+
VERSION = "0.0.
3
"
5
5
end
6
6
end
7
7
end
metadata
CHANGED
Viewed
@@ -2,7 +2,7 @@
2
2
name: mongoid-friendly-timestamps
3
3
version: !ruby/object:Gem::Version
4
4
prerelease:
5
-
version: 0.0.
2
5
+
version: 0.0.
3
6
6
platform: ruby
7
7
authors:
8
8
- Lee Henson