module Clear::Model::Converter::BoolConverter

Overview

Convert the column to a boolean If value is not boolean (e.g. string or number), rules of falsey value is used:

falsey's values are: false, nil, 0, "0", "" (empty string), "false", "f"

Anything else is considered true

Defined in:

clear/model/converters/bool_converter.cr

Class Method Summary

Class Method Detail

def self.to_column(x) : Bool | Nil #

[View source]
def self.to_db(x : Bool | Nil) #

[View source]