tim
1
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:
…
Any ideas on why the discrepancy and perhaps a fix for the controller
bit?
Thanks in advance!
Tim
tim
2
Tim wrote:
Hey all,
rails 2.1
…
Any ideas on why the discrepancy and perhaps a fix for the controller
bit?
Odd. I just tried this out of curiosity in Rails 2.3.3 and it worked as
expected:
<?xml version="1.0" encoding="UTF-8"?>
Title can't be bland
A Rails 2.1 bug possibly??
tim
3
Robert W. wrote:
<?xml version="1.0" encoding="UTF-8"?>
Title can't be bland
Obviously, titles must be interesting to be accepted. hehe. Sorry, I
meant to type “blank.”