2010-03-29 57 views
0

如果你在Rails的一個數組,to_xml將巢「記錄」標籤下的每個對象。有沒有辦法來重寫這個命名呢?Rails的to_xml覆蓋

回答

2
my_array.to_xml :root => 'foos'