title: Active record joins in rails 3.1
body: <p>Trying to return all comments associated with articles written by a particular user.
  The following code gives me the error:</p>
  
  <pre><code>undefined method `joins' for #&lt;User:0x000001042c8bc0&gt;
  </code></pre>
  
  <p>under Rails 3.1</p>
  
  <pre><code>class User
    has_many :articles
  
    def comments
      self.joins(:articles =&gt; :comments)
    end
  
  end
  </code></pre>