Sha256: acf34423c0dfd7543d786fe4758675892cd54459c7391830cd83e21b04c066ba
Contents?: true
Size: 546 Bytes
Versions: 7
Compression:
Stored size: 546 Bytes
Contents
module Arel module Attributes class Boolean < Attribute def type_cast(value) case value when true, false then value # when nil then options[:allow_nil] ? nil : false when nil then false when 1 then true when 0 then false else case value.to_s.downcase.strip when 'true' then true when 'false' then false else raise typecast_error(value) end end end end end end
Version data entries
7 entries across 7 versions & 2 rubygems