title: to_xml with :only and :methods
body: <p>I'm calling to_xml on an ActiveRecord object with both :only and :methods parameters.</p>
  
  <p>The method that I'm including returns a collection for AR objects. This works fine without the :only param, but when that is added I just get the default to_s representation of my objects.</p>
  
  <p>i.e</p>
  
  <pre><code>&lt;author&gt;&lt;books&gt;#&amp;lt;Book:0x107753228&amp;gt;&lt;/books&gt;\n&lt;/author&gt;
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Update, here is the code:</p>
  
  <pre><code>class Author &lt; ActiveRecord::Base
    def books
      #this is a named scope
      products.by_type(:book)
    end
  end
  
  Author.to_xml(:methods =&gt; :books, :only =&gt; :id)
  </code></pre>