Class: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Date

Inherits:
Type
  • Object
show all
Defined in:
lib/active_record/connection_adapters/postgresql/oid.rb

Instance Method Summary collapse

Methods inherited from Type

#type_cast_for_write

Instance Method Details

#typeObject



197
# File 'lib/active_record/connection_adapters/postgresql/oid.rb', line 197

def type; :datetime; end

#type_cast(value) ⇒ Object



199
200
201
202
203
204
205
# File 'lib/active_record/connection_adapters/postgresql/oid.rb', line 199

def type_cast(value)
  return if value.nil?

  # FIXME: probably we can improve this since we know it is PG
  # specific
  ConnectionAdapters::Column.value_to_date value
end