Use this: ActiveRecord::Base.connection.quote(true) or ActiveRecord::Base.connection.quoted_true or ActiveRecord::Base.connection.quoted_false