malformed XML

Tim
Tue, 18 Aug 2009 19:13:53 -0000

Hey all,

rails 2.1

When I do this from the controller:

  render :xml => @address.errors, :status => :unprocessable_entity

  I get a malformed root node in the XML

  <active-record/errors type="array"> ...
</active-record/errors> #
note the extra slashes

However when I do this in the console:

  address.errors.to_xml

  I get the following which seems fine:

  <errors> ... </errors>

Any ideas on why the discrepancy and perhaps a fix for the controller
bit?

Thanks in advance!
Tim