title: How to select where ID in Array Rails ActiveRecord without exception
body: <p>When I have array of ids, like</p>
  
  <pre><code>ids = [2,3,5]
  </code></pre>
  
  <p>and I perform</p>
  
  <pre><code>Comment.find(ids)
  </code></pre>
  
  <p>everything works fine. But when there is id that doesn't exist, I get an exception. This occurs generaly when I get list of IDs that match some filter and than I do something like</p>
  
  <pre><code>current_user.comments.find(ids)
  </code></pre>
  
  <p>This time I may have a valid comment ID, which however does not belong to given User, so it is not found and I get an exception.</p>
  
  <p>I've tried <code>find(:all, ids)</code>, but it returns all of the records.</p>
  
  <p>The only way I can do it now is</p>
  
  <pre><code>current_user.comments.select { |c| ids.include?(c.id) }
  </code></pre>
  
  <p>But that seems to me like super inefficient solution.</p>
  
  <p>Is there better way to select <em>ID in Array</em> without getting exception on non-existing record?</p>