Method: ActiveModel::Errors#merge!
- Defined in:
- activemodel/lib/active_model/errors.rb
#merge!(other) ⇒ Object
Merges the errors from other, each Error wrapped as NestedError.
Parameters
-
other- The ActiveModel::Errors instance.
Examples
person.errors.merge!(other)
174 175 176 177 178 179 180 |
# File 'activemodel/lib/active_model/errors.rb', line 174 def merge!(other) return errors if equal?(other) other.errors.each { |error| import(error) } end |