edge badge
Methods
T
Included Modules
Instance Public methods
type()
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/point.rb, line 8
def type
  :point
end
type_cast(value)
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/point.rb, line 12
def type_cast(value)
  case value
  when ::String
    if value[0] == '(' && value[-1] == ')'
      value = value[1...-1]
    end
    type_cast(value.split(','))
  when ::Array
    value.map { |v| Float(v) }
  else
    value
  end
end
type_cast_for_database(value)
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/point.rb, line 26
def type_cast_for_database(value)
  if value.is_a?(::Array)
    PostgreSQLColumn.point_to_string(value)
  else
    super
  end
end