title: Mongoid `group()` conditions
body: <p>I want to provide a condition for my grouping in Mongoid, but how can I send in multiple values for an attribute in the conditions hash? This is what I want to do:    </p>
  
  <pre><code>PageViews.collection.group(
    cond: {page_id: ['4e6912618083ab383e000010', '4e6912618083ab383e000009']},
    key: 'timestamp',
    initial: {count: 0},
    reduce: "function(x, y) {y.count += x.count;}"
  )
  </code></pre>
  
  <p>So therefore any <code>PageView</code> with the either <code>page_id</code> will be apart of the query, but I can't seem to get the condition hash (<code>cond</code>) to work at all! What am I doing wrong here, I'm really confused.</p>
  
  <p>Here is the API docs for the <code>group()</code> method: <a href="http://api.mongodb.org/ruby/current/Mongo/Collection.html#group-instance_method" rel="noreferrer">http://api.mongodb.org/ruby/current/Mongo/Collection.html#group-instance_method</a></p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <hr>
  
  <p><strong>update</strong></p>
  
  <p>Running the query as such:</p>
  
  <pre><code>PageViews.collection.group(
    cond: {page_id: { $in : ['4e6912618083ab383e000010', '4e6912618083ab383e000009']}},
    key: 'timestamp',
    initial: {count: 0},
    reduce: "function(x, y) {y.count += x.count;}"
  )
  </code></pre>
  
  <p>Returns the following error, but the syntax looks fine to me:</p>
  
  <pre><code>SyntaxError: (irb):170: syntax error, unexpected ':', expecting tASSOC
    cond: {page_id: { $in : ['4e6912618083ab383e000010',...
                           ^
  (irb):170: syntax error, unexpected '}', expecting $end
  ...', '4e6912618083ab383e000009']}},
  ...                               ^
      from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/commands/console.rb:45:in `start'
      from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/commands/console.rb:8:in `start'
      from /usr/local/lib/ruby/gems/1.9.1/gems/railties-3.1.0/lib/rails/commands.rb:40:in `&lt;top (required)&gt;'
      from script/rails:6:in `require'
      from script/rails:6:in `&lt;main&gt;'
  </code></pre>
  
  <p>It's frustrating that there are like no examples of this anywhere, the docs say that the condition parameter is as such:</p>
  
  <blockquote>
    <p>(String, BSON::Code) :cond — default: {} — A document specifying a
    query for filtering the documents over which the aggregation is run
    (optional).</p>
  </blockquote>
  
  <p>So if it takes a <code>String</code> or <code>BSON::Code</code>, what would this look like?</p>