class ActiveModel::Errors
def to_xml(options = {})
#
#
#
#
# =>
person.errors.to_xml
person.errors.add(:name, :not_specified, message: "must be specified")
person.errors.add(:name, :blank, message: "can't be blank")
Returns an xml formatted representation of the Errors hash.
def to_xml(options = {}) to_a.to_xml({ root: "errors", skip_types: true }.merge!(options)) end