Parse a boolean

ActiveModel::Type::Boolean.new.cast(value)

value could be a string, a symbol, an integer or a boolean.

Note that Rails only defines false values and checks against those. All other values are considered to be true.

Values considered to be false are:

strings:

symbols:

integers:

booleans: