mongoid2 站点:http://two.mongoid.org/
关于mongoid 查询的返回即时结果: 用 to_a 就可以了。 相当于ActiveRecord3 中的 .all 方法。
Item.limit(3).to_a
see: [url]http://stackoverflow.com/a/6607689/445908[/url]
关于mongoid 查询的返回即时结果: 用 to_a 就可以了。 相当于ActiveRecord3 中的 .all 方法。
Item.limit(3).to_a
see: [url]http://stackoverflow.com/a/6607689/445908[/url]