title: How to set the collection name in Mongoid for a subclass?
body: <pre><code>class Foo
    include Mongoid::Document
  end
  
  class Bar &lt; Foo
  end
  </code></pre>
  
  <p>Foo.all returns Bars, and Bar.all returns Foos.</p>
  
  <p>I want to put Foo and Bar in separate collections.</p>
  
  <p>I tried </p>
  
  <pre><code>class Bar &lt; Foo
    store_in collection: 'bars'
  </code></pre>
  
  <p>but got </p>
  
  <pre><code>Mongoid::Errors::InvalidStorageParent:
  Problem:
    Invalid store_in call on class Bar.
  Summary:
    The :store_in macro can only be called on a base Mongoid Document
  </code></pre>
  
  <p>Using Mongoid 4.0.2</p>