title: With Mongoid, how to grab a collection of collections (via subdocuments)?
body: <p>I have a Mongoid structure that looks sort of like this:</p>
  
  <pre><code>class Site
    has_many :web_pages
    field :name, type: String
    # ... other stuff
  end      
  
  class WebPage
    belongs_to :site
    embeds_one :content
    # ... other stuff
  end
  
  class Content
    embeds_many :images
    # ... other stuff
  end
  
  class Image
    embedded_in :content
    field :title, type: String
    field :bytes, type: Integer
    # ... other stuff
  end
  </code></pre>
  
  <p>What I want to do is have a Mongoid query that given a Site name, pull out a collection of Image records, but only the title and bytes fields.</p>
  
  <p>I know I can do this iteratively via Ruby... i.e. I can grab all the WebPages for a given Site (by name), iterate through them and for each, grab it's one Content record and then all the Images for that Content, plucking only the title and bytes fields.  But that's an N+1 query whereas I'm sure there must be a way in a single query to pull out all the Images for all the WebPages for a given Site (by title).</p>
  
  <p>I welcome any suggestions on how to arrange this with Mongoid.</p>