title: How do I preload an association in rails based on a condition
body: <p>I am trying to preload an association, say you have <code>Posts</code> and <code>subscribers</code>.</p>
  
  <p>I want to preload all posts where the current user is a <code>subscriber</code>, but at the same time, preload all the <code>subscribers</code> as well.</p>
  
  <p>The query I am using is like this:</p>
  
  <pre><code>Post.includes(:subscribers)
      .references(:subscribers)
      .where(subscribers: { id: current_user.id })
  </code></pre>
  
  <p>This gives me the correct list of <code>posts</code> but does not give me all the <code>subscribers</code> for each <code>post</code>, just the current user. Is there a way to get all the <code>subscribers</code> while at the same time scope it to only posts that I can see as a subscriber?</p>