Sha256: 1a8f1e256117cd1116cdb9fbe2a8dcbfea2d057ba22e9d55eab11846dfde15c9
Contents?: true
Size: 430 Bytes
Versions: 14
Compression:
Stored size: 430 Bytes
Contents
module Virtus class Attribute # Attribute extension which nullifies blank attributes when coercion failed # module NullifyBlank # @see [Attribute#coerce] # # @api public def coerce(input) output = super if !value_coerced?(output) && input.to_s.empty? nil else output end end end # NullifyBlank end # Attribute end # Virtus
Version data entries
14 entries across 12 versions & 5 rubygems