views:

102

answers:

1

If you have an array in Rails, to_xml will nest each object under a 'records' tag. Is there a way to override this to name it something else?

A: 

my_array.to_xml :root => 'foos'

Jack