Class: ActiveRecord::ConnectionAdapters::SQLite3String
- Inherits:
-
Type::String
- Object
- Type::Value
- Type::String
- ActiveRecord::ConnectionAdapters::SQLite3String
- Defined in:
- lib/active_record/connection_adapters/sqlite3_adapter.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Type::Value
Instance Method Summary collapse
Methods inherited from Type::String
Methods inherited from Type::Value
#==, #binary?, #changed?, #changed_in_place?, #initialize, #klass, #number?, #type, #type_cast_for_schema, #type_cast_from_database, #type_cast_from_user
Constructor Details
This class inherits a constructor from ActiveRecord::Type::Value
Instance Method Details
#type_cast_for_database(value) ⇒ Object
54 55 56 57 58 59 60 |
# File 'lib/active_record/connection_adapters/sqlite3_adapter.rb', line 54 def type_cast_for_database(value) if value.is_a?(::String) && value.encoding == Encoding::ASCII_8BIT value.encode(Encoding::UTF_8) else super end end |