Class: ActiveRecord::Type::Time

Inherits:
ActiveModel::Type::Time
  • Object
show all
Includes:
Internal::Timezone
Defined in:
lib/active_record/type/time.rb

Defined Under Namespace

Classes: Value

Instance Method Summary collapse

Methods included from Internal::Timezone

#default_timezone, #is_utc?

Instance Method Details

#serialize(value) ⇒ Object


9
10
11
12
13
14
15
16
# File 'lib/active_record/type/time.rb', line 9

def serialize(value)
  case value = super
  when ::Time
    Value.new(value)
  else
    value
  end
end