method
cast_value
v7.2.3 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Bit
cast_value(value)public
No documentation available.
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb, line 12
def cast_value(value)
if ::String === value
case value
when /^0x/
value[2..-1].hex.to_s(2) # Hexadecimal notation
else
value # Bit-string notation
end
else
value.to_s
end
end