This project is archived and is in readonly mode.
array.to_xml should be able to handle all types of data elements
Reported by Neeraj Singh | April 27th, 2010 @ 09:44 PM
As of now array.to_xml only works if each of the elements of array respond_to to_xml. It means an array like the one given below consisting of only integer will not work.
a = [1, 2 ,3] a.to_xml #=> will blow up
Attached is a patch that fixes this problem and brings to_xml support of an array inline with to_xml support of a hash.
Comments and changes to this ticket
-
Neeraj Singh April 27th, 2010 @ 09:47 PM
- no changes were found...
-
Repository April 29th, 2010 @ 08:31 AM
- State changed from new to resolved
(from [580dd3b052e471aa680b80c0e1d8ebe7bd7a3831]) array.to_xml should be able to handle all types of data elements [#4490 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/580dd3b052e471aa680b80c0e1d8eb...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 4490 array.to_xml should be able to handle all types of data elements (from [580dd3b052e471aa680b80c0e1d8ebe7bd7a3831]) array.t...
- 458 record.to_xml(:methods => other_ids) yields incorrect representation https://rails.lighthouseapp.com/projects/8994/tickets/4490