I\'m trying to insert a false boolean value in a SQLite3 table but it always inserts a true value.
Here\'s my migration:
class CreateUsers < Activ
This version works in Rails 4.1.
require 'active_record/connection_adapters/sqlite_adapter'
module ActiveRecord::ConnectionAdapters::SQLite3Adapter
QUOTED_TRUE, QUOTED_FALSE = 't'.freeze, 'f'.freeze
def quoted_true; QUOTED_TRUE end
def quoted_false; QUOTED_FALSE end
end
The constants and .freeze are for performance, so ruby doesn't have to regenerate those strings and garbage collect them on every call.