class ActiveModel::Errors

def copy!(other) # :nodoc:

:nodoc:

person.errors.copy!(other)

==== Examples

* +other+ - The ActiveModel::Errors instance.

==== Parameters

For copying errors but keep @base as is.
Copies the errors from other.
def copy!(other) # :nodoc:
  @errors = other.errors.deep_dup
  @errors.each { |error|
    error.instance_variable_set(:@base, @base)
  }
end