Class: Date
- Inherits:
-
Object
- Object
- Date
- Defined in:
- lib/sequent/core/ext/ext.rb
Class Method Summary collapse
Class Method Details
.deserialize_from_json(value) ⇒ Object
54 55 56 |
# File 'lib/sequent/core/ext/ext.rb', line 54 def self.deserialize_from_json(value) value.blank? ? nil : Date.iso8601(value.dup) end |
.from_params(value) ⇒ Object
46 47 48 49 50 51 52 |
# File 'lib/sequent/core/ext/ext.rb', line 46 def self.from_params(value) return value if value.is_a?(Date) value.blank? ? nil : Date.iso8601(value.dup) rescue ArgumentError value end |