Sha256: bb274fc9b760a257f0a98b4bbaae0e36074c5171a13641ffe08255458836b9ce
Contents?: true
Size: 276 Bytes
Versions: 38
Compression:
Stored size: 276 Bytes
Contents
module Validatable class ValidatesAssociated < ValidationBase #:nodoc: def valid?(instance) Array(instance.send(attribute)).compact.map do |child| child.valid? end.all? end def message(instance) super || "is invalid" end end end
Version data entries
38 entries across 38 versions & 9 rubygems