class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Float

Public Instance Methods

type_cast(value) click to toggle source
# File lib/active_record/connection_adapters/postgresql/oid.rb, line 212
def type_cast(value)
  case value
    when nil;         nil
    when 'Infinity';  ::Float::INFINITY
    when '-Infinity'; -::Float::INFINITY
    when 'NaN';       ::Float::NAN
  else
    value.to_f
  end
end