I am trying to backup data to a yaml store on deletion like so:
DeleteProject.create!(:data => {
:project => project.attributes,
:domains => project.domains.collect(&:attributes),
:databases => project.databases.collect(&:attributes)
}.to_yaml)
However although the project and domain data is stored fine, databases is always coming back blank. The relationship is done via
- has_and_belongs_to_many :databases
- has_and_belongs_to_many :projects
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!