method
string_to_bit
rails latest stable - Class:
ActiveRecord::ConnectionAdapters::PostgreSQLColumn::Cast
string_to_bit(value)public
No documentation available.
# File activerecord/lib/active_record/connection_adapters/postgresql/cast.rb, line 29
def string_to_bit(value)
case value
when /^0x/
value[2..-1].hex.to_s(2) # Hexadecimal notation
else
value # Bit-string notation
end
end