title: Rails 2: #to_xml(:methods => :method_name) when #method_name returns an Array
body: <p>Is it possible to override how #to_xml renders a method result if it's an Array?</p>
  
  <p>Given #numbers is not a field but a method
  And @object.numbers #=> [0,1,2,3,4,5]</p>
  
  <p>currently it does:</p>
  
  <pre><code>@object.to_xml(:methods =&gt; :numbers)
  =&gt; "&lt;object&gt;&lt;numbers&gt;012345&lt;/numbers&gt;&lt;/object&gt;"
  </code></pre>
  
  <p>is it possible to override this behavior so it returns:</p>
  
  <pre><code>@object.to_xml(:methods =&gt; :numbers)
  =&gt; "&lt;object&gt;
        &lt;numbers&gt;
          &lt;number&gt;0&lt;/number&gt;
          &lt;number&gt;1&lt;/number&gt;
          &lt;number&gt;2&lt;/number&gt;
          &lt;number&gt;3&lt;/number&gt;
          &lt;number&gt;4&lt;/number&gt;
          &lt;number&gt;5&lt;/number&gt;
        &lt;/numbers&gt;
      &lt;/object&gt;"
  </code></pre>
  
  <p>(formatted so it's easily read)</p>
  
  <p>Thanks in advance for your suggestions!</p>