to_xml(options={})
Return an XML representation of this error object.
# File activerecord/lib/active_record/validations.rb, line 162 def to_xml(options={}) options[:root] ||= "errors" options[:indent] ||= 2 options[:builder] ||= Builder::XmlMarkup.new(:indent => options[:indent]) options[:builder].instruct! unless options.delete(:skip_instruct) options[:builder].errors do |e| full_messages.each { |msg| e.error(msg) } end end