Problem in ActiveRecord#to_xml

Hi, a couple of days ago I filed a ticket related to a problem with the to_xml ActiveRecord method. (https://rails.lighthouseapp.com/projects/8994/tickets/3982-patch-solved-a-bug-that-prevented-xml-serialization-when-activerecord-attributes-contains-more-than-column-values).

I solved it by making to_xml to infere the type by means of a ruby-xml type conversion, using a Hash that was already there. Thought this was the best choice, cause you still has the possibility to hide the attributes shown by means of the :except option, another approach would imply a more in-depth change.

Don’t know whether this is the best way or not, any ideas/feedback are appreciated.

Jose Fernández.