Class: ActiveModel::Type::Date
- Defined in:
- lib/active_model/type/date.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Value
Instance Method Summary collapse
Methods inherited from Value
#==, #assert_valid_value, #binary?, #cast, #changed?, #changed_in_place?, #deserialize, #force_equality?, #hash, #initialize, #map, #value_constructed_by_mass_assignment?
Constructor Details
This class inherits a constructor from ActiveModel::Type::Value
Instance Method Details
#serialize(value) ⇒ Object
12 13 14 |
# File 'lib/active_model/type/date.rb', line 12 def serialize(value) cast(value) end |
#type ⇒ Object
8 9 10 |
# File 'lib/active_model/type/date.rb', line 8 def type :date end |
#type_cast_for_schema(value) ⇒ Object
16 17 18 |
# File 'lib/active_model/type/date.rb', line 16 def type_cast_for_schema(value) value.to_s(:db).inspect end |