title: default_scope and associations
body: <p>Suppose I have a Post model, and a Comment model. Using a common pattern, Post has_many Comments.</p>
  
  <p>If Comment has a default_scope set:</p>
  
  <pre><code>default_scope where("deleted_at IS NULL")
  </code></pre>
  
  <p>How do I easily retrieve ALL comments on a post, regardless of scope?
  This produces invalid results:</p>
  
  <pre><code>Post.first.comments.unscoped
  </code></pre>
  
  <p>Which generates the following queries:</p>
  
  <pre><code>SELECT * FROM posts LIMIT 1;
  SELECT * FROM comments;
  </code></pre>
  
  <p>Instead of:</p>
  
  <pre><code>SELECT * FROM posts LIMIT 1;
  SELECT * FROM comments WHERE post_id = 1;
  </code></pre>
  
  <p>Running:</p>
  
  <pre><code>Post.first.comments
  </code></pre>
  
  <p>Produces:</p>
  
  <pre><code>SELECT * FROM posts LIMIT 1;
  SELECT * FROM comments WHERE deleted_at IS NULL AND post_id = 1;
  </code></pre>
  
  <p>I understand the basic principle of unscoped removing all existing scopes, but shouldn't it be aware and to keep the association scope?</p>
  
  <p>What is the best way to pull ALL comments?</p>