I've built a Rail 3 AuditLog with the help of a few plugins, that store data in an AuditLog Table with the following fields for identification (feeded_id, feeded_type)
So in my case, I have a photoalbum that has_many photos.
class PhotoAlbum < ActiveRecord::Base
has_many :photos, :dependent => :destroy
when I delete a photoalbum (id=2) this works very well to delete all associated photos, but it doesn't delete items from the AuditLog that are like this: (feeded_id = 2, feeded_type = PhotoAlbum)
Given that the AuditLog table doesn't have a "photo_album_id" column, and can't, is there a way to setup a dependent > Destory with Rails to delete all associated items in teh AuditLog when a PhotoAlbum is deleted?
Thanks, I know this one's a little more complicated than most. Thanks for reading through it!