Class: Mongoid::EncryptedDate
- Inherits:
-
Date
- Object
- Date
- Mongoid::EncryptedDate
show all
- Includes:
- EncryptedField
- Defined in:
- lib/mongoid-encrypted-fields/fields/encrypted_date.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.rb', line 27
def convert(object)
from_date(object.to_datetime)
end
|
.from_date(date) ⇒ Object
23
24
25
|
# File 'lib/mongoid-encrypted-fields/fields/encrypted_date.rb', line 23
def from_date(date)
parse(date.to_s)
end
|