class method
self.emulate_booleans
Ruby on Rails 5.2.8.1
Since v3.2.22.5By default, the Mysql2Adapter will consider all columns of type tinyint(1) as boolean. If you wish to disable this emulation you can add the following line to your application.rb file:
ActiveRecord::ConnectionAdapters::Mysql2Adapter.emulate_booleans = false
Source
# File activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb, line 29
class_attribute :emulate_booleans, default: true
Defined in activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb line 29
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter