2009-10-09 71 views

回答

4

你可以使用:

MyModel.all.map &:attributes 

即相当于:

MyModel.find(:all).collect {|x| x.attributes} 
相关问题