rails 与 mongoid - 是否有 .loaded 的类似物?

rails with mongoid - is there an analog to .loaded?

在 rails / mysql 应用程序中,有一种方法可以让您检查关联对象是否已加载,或者如果您引用它会触发数据库查询:

a = Author.first
b.books.loaded?

但是在mongoid中,没有这样的方法。 mongoid 中是否有另一种方法可以做类似的事情?

感谢您的帮助。

方法是

_loaded?

出于某种原因,我要求我添加更多填充物,即使以上是正确答案,所以你开始吧。这是我喜欢的《了不起的盖茨比》的开场白:

In my younger and more vulnerable years my father gave me some advice 
that I’ve been turning over in my mind ever since.  “Whenever you 
feel like criticizing any one,” he told me, “just remember that 
all the people in this world haven’t had the advantages that you’ve had.”