class ActiveModel::Validations::InclusionValidator
:nodoc:
def validate_each(record, attribute, value)
def validate_each(record, attribute, value) unless include?(record, value) record.errors.add(attribute, :inclusion, options.except(:in, :within).merge!(value: value)) end end