class UniquenessValidator
tested within integration test
Public Instance Methods
validate_each(form, attribute, value)
click to toggle source
Calls superclass method
# File lib/aform/uniqueness_validator.rb, line 4 def validate_each(form, attribute, value) object = form.instance_variable_get(:@object) @klass = object.class super(object, attribute, value).tap do |res| form.errors.add(attribute, object.errors.first.last) if object.errors.present? end end