instance method
merge!
Ruby on Rails edge
Since v5.2.8.1Signature
merge!(other)
Merges the errors from other,
each Error wrapped as NestedError.
#### Parameters
* `other` - The ActiveModel::Errors instance.
#### Examples
```
person.errors.merge!(other)
```
: (untyped) -> Array
Parameters
-
otherreq
Source
# File activemodel/lib/active_model/errors.rb, line 189
def merge!(other)
return errors if equal?(other)
other.errors.each { |error|
import(error)
}
end
Defined in activemodel/lib/active_model/errors.rb line 189
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Errors