Class: ActiveEnquo::Type::Date
- Inherits:
-
ActiveEnquo::Type
- Object
- ActiveRecord::Type::Value
- ActiveEnquo::Type
- ActiveEnquo::Type::Date
- Defined in:
- lib/active_enquo.rb
Instance Method Summary collapse
- #decrypt(value, context, field) ⇒ Object
- #encrypt(value, context, field, enable_reduced_security_operations: false, no_query: false) ⇒ Object
- #type ⇒ Object
Instance Method Details
#decrypt(value, context, field) ⇒ Object
314 315 316 |
# File 'lib/active_enquo.rb', line 314 def decrypt(value, context, field) field.decrypt_date(value, context) end |
#encrypt(value, context, field, enable_reduced_security_operations: false, no_query: false) ⇒ Object
305 306 307 308 309 310 311 312 |
# File 'lib/active_enquo.rb', line 305 def encrypt(value, context, field, enable_reduced_security_operations: false, no_query: false) value = cast_to_date(value) if value.nil? value else field.encrypt_date(value, context, unsafe: enable_reduced_security_operations, no_query: no_query) end end |
#type ⇒ Object
301 302 303 |
# File 'lib/active_enquo.rb', line 301 def type :enquo_date end |