在 Ruby 中,如何使用 mongomapper 之类的东西遍历从集合中检索到的任意文档?假设文档看起来像这样:
mydocs = [{
"title": "my title",
"description": "hello world",
"comments": [{
"user": "me",
"text": "this"
}, {
"user": "him",
"text": "that"
}]
},
{
.....
}
]