If y开发者_运维知识库ou 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?
my_array.to_xml :root => 'foos'
If y开发者_运维知识库ou 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?
my_array.to_xml :root => 'foos'
精彩评论