Class: ActiveRecord::ConnectionAdapters::SQLite3Column

Inherits:
Column
  • Object
show all
Defined in:
lib/active_record/connection_adapters/sqlite3_adapter.rb

Overview

:nodoc:

Constant Summary

Constants inherited from Column

Column::FALSE_VALUES, Column::TRUE_VALUES

Instance Attribute Summary

Attributes inherited from Column

#coder, #default, #default_function, #limit, #name, #null, #precision, #primary, #scale, #sql_type, #type

Class Method Summary collapse

Methods inherited from Column

#binary?, #extract_default, #has_default?, #human_name, #initialize, #klass, #number?, string_to_binary, #string_to_binary, string_to_dummy_time, string_to_time, #text?, #type_cast, #type_cast_code, #type_cast_for_write, value_to_boolean, value_to_date, value_to_decimal, value_to_integer

Constructor Details

This class inherits a constructor from ActiveRecord::ConnectionAdapters::Column

Class Method Details

.binary_to_string(value) ⇒ Object



40
41
42
43
44
45
# File 'lib/active_record/connection_adapters/sqlite3_adapter.rb', line 40

def binary_to_string(value)
  if value.encoding != Encoding::ASCII_8BIT
    value = value.force_encoding(Encoding::ASCII_8BIT)
  end
  value
end