示例文件:
{
"_id" : ObjectId("53c32ac056c02c506b000003"),
"participants" : {
"user" : ObjectId("53c32ac056c02c506b000002"), # id of the user from User model
"active" : "pending"
}
}
如何使用参与者哈希中的ObjectId显示用户名?
我尝试了很多,belongs_to但没有任何作用:(