Methods
S
V
Instance Public methods
setup(klass)
# File activemodel/lib/active_model/validations/confirmation.rb, line 11
def setup(klass)
  klass.send(:attr_accessor, *attributes.map do |attribute|
    :"#{attribute}_confirmation" unless klass.method_defined?(:"#{attribute}_confirmation")
  end.compact)
end
validate_each(record, attribute, value)
# File activemodel/lib/active_model/validations/confirmation.rb, line 5
def validate_each(record, attribute, value)
  if (confirmed = record.send("#{attribute}_confirmation")) && (value != confirmed)
    record.errors.add(attribute, :confirmation, options)
  end
end