class ActiveModel::Validations::ExclusionValidator

:nodoc:

def validate_each(record, attribute, value)

def validate_each(record, attribute, value)
  if include?(record, value)
    record.errors.add(attribute, :exclusion, options.except(:in, :within).merge!(value: value))
  end
end