Sha256: 1c192b188776cedb4b015a70a40c5a26e535542cb1615770c85ec974c1db6d32
Contents?: true
Size: 233 Bytes
Versions: 68
Compression:
Stored size: 233 Bytes
Contents
class SubsetValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) superset = options[:of] rest = value - superset record.errors.add(attribute, :subset, options) unless rest.empty? end end
Version data entries
68 entries across 68 versions & 1 rubygems