Flowdock
method

type_cast

Importance_0
v4.2.1 - Show latest stable - 0 notes - Class: Bit
type_cast(value) public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/connection_adapters/postgresql/oid/bit.rb, line 10
          def type_cast(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
            end
          end
Register or log in to add new notes.