instance method
merge!
Ruby on Rails 7.2.3
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)
Parameters
-
otherreq
Source
# File activemodel/lib/active_model/errors.rb, line 174
def merge!(other)
return errors if equal?(other)
other.errors.each { |error|
import(error)
}
end
Defined in activemodel/lib/active_model/errors.rb line 174
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Errors