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

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

Instance Method Summary collapse

Instance Method Details

#typeObject



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

def type; :datetime; end

#type_cast(value) ⇒ Object



192
193
194
195
196
197
198
# File 'activerecord/lib/active_record/connection_adapters/postgresql/oid.rb', line 192

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