Class: Mongoid::EncryptedDateTime
- Inherits:
-
DateTime
- Object
- DateTime
- Mongoid::EncryptedDateTime
show all
- Includes:
- EncryptedField
- Defined in:
- lib/mongoid-encrypted-fields/fields/encrypted_date_time.rb
Class Method Summary
collapse
#encrypted, #mongoize, #raw_value
Class Method Details
.convert(object) ⇒ Object
27
28
29
|
# File 'lib/mongoid-encrypted-fields/fields/encrypted_date_time.rb', line 27
def convert(object)
from_datetime(object.to_datetime)
end
|
.from_datetime(d) ⇒ Object
23
24
25
|
# File 'lib/mongoid-encrypted-fields/fields/encrypted_date_time.rb', line 23
def from_datetime(d)
parse(d.to_s)
end
|