title: Ruby on Rails , habtm collect method not collecting?
body: <p>I am trying to backup data to a yaml store on deletion like so:</p>
  
  <pre><code>DeleteProject.create!(:data =&gt; {
    :project =&gt; project.attributes, 
    :domains =&gt; project.domains.collect(&amp;:attributes), 
    :databases =&gt; project.databases.collect(&amp;:attributes)
  }.to_yaml)
  </code></pre>
  
  <p>However although the project and domain data is stored fine, databases is always coming back blank. The relationship is done via</p>
  
  <ul>
  <li><strong>has_and_belongs_to_many :databases</strong></li>
  <li><strong>has_and_belongs_to_many :projects</strong></li>
  </ul>
  
  <p>I am at a dead end with this one as I do not know why it simply would not be passing in the current data from project.databases. Any insight would be great, thanks!</p>