method

cast_value

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: Bit
cast_value(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 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
Register or log in to add new notes.