【发布时间】:2010-06-21 07:29:45
【问题描述】:
在 Ruby 中,如何使用 mongomapper 之类的工具遍历从集合中检索到的任意文档?假设文档看起来像这样:
mydocs = [{
"title": "my title",
"description": "hello world",
"comments": [{
"user": "me",
"text": "this"
}, {
"user": "him",
"text": "that"
}]
},
{
.....
}
]
【问题讨论】:
标签: ruby-on-rails ruby json mongodb mongomapper