Class: ActiveRecord::Type::Time
- Inherits:
-
ActiveModel::Type::Time
- Object
- ActiveModel::Type::Time
- ActiveRecord::Type::Time
show all
- Includes:
- Internal::Timezone
- Defined in:
- lib/active_record/type/time.rb
Defined Under Namespace
Classes: Value
Instance Method Summary
collapse
#default_timezone, #initialize, #is_utc?
Instance Method Details
#serialize(value) ⇒ Object
11
12
13
14
15
16
17
18
|
# File 'lib/active_record/type/time.rb', line 11
def serialize(value)
case value = super
when ::Time
Value.new(value)
else
value
end
end
|
#serialize_cast_value(value) ⇒ Object
20
21
22
|
# File 'lib/active_record/type/time.rb', line 20
def serialize_cast_value(value) Value.new(super) if value
end
|