Using mongodb and mongoid. How would one grab all articles. Only articles with comments created 20 minutes ago?
class Article
include Mongoid::Document
has_many :comments
end
class Comment
include Mongoid::Document
belongs_to :article
end
you can also do this, which should be more efficient: