title: Retrieve list of mongo documents by ids preserving order
body: <p>Which is the best way to retrieve a list of mongodb documents using mongoid in the order specified in the list. </p>
  
  <p>My current solution is:  </p>
  
  <pre><code>docs = Doc.where(:_id.in =&gt; ids).sort { |x, y| ids.index(x.id) &lt;=&gt; ids.index(y.id) }
  </code></pre>
  
  <p>It seems there should be a better solution for this using mongoid query interface. Any ideas? </p>