Module: Mongoid
- Defined in:
- lib/mongoid-encrypted-fields/fields/encrypted_date.rb,
lib/mongoid-encrypted-fields.rb,
lib/mongoid-encrypted-fields/logging.rb,
lib/mongoid-encrypted-fields/version.rb,
lib/mongoid-encrypted-fields/fields/encrypted_hash.rb,
lib/mongoid-encrypted-fields/fields/encrypted_time.rb,
lib/mongoid-encrypted-fields/fields/encrypted_field.rb,
lib/mongoid-encrypted-fields/fields/encrypted_string.rb,
lib/mongoid-encrypted-fields/fields/encrypted_date_time.rb
Overview
Used to store an encrypted datetime in Mongo
Usage: field :birth_date, type: Mongoid::EncryptedDate
Set with an unencrypted date p = Person.new() p.birth_date = Date.new(2000, 1, 1)
Get returns the unencrypted date puts p.birth_date -> ‘Jan 1, 2000’
Use the encrypted property to see the encrypted value puts p.birth_date.encrypted -> ‘.…’
Defined Under Namespace
Modules: EncryptedField, EncryptedFields Classes: EncryptedDate, EncryptedDateTime, EncryptedHash, EncryptedString, EncryptedTime