Polymorphic destroy of resource

Does dependent destroy work with polymorphic=>true? Otherwise,
should I overload destroy, destroying the item, and then deleting the
via the class delete to avoid the recursive destroy?

This doesn’t work:

class FolderLinking < ActiveRecord::Base

belongs_to :folder_linkable, :polymorphic =>
true, :dependent=> :destroy

when an instance of FolderLinking is destroyed, I want the item that
it links to destroyed. I’m currently seeing the folder_linkable
sticking around.

Yottameter <[email protected]…> writes:

belongs_to :folder_linkable, :polymorphic =>
true, :dependent=> :destroy

Specifying :dependent=> :destroy on the has_one declaration causes the
to be destroyed with the resource. You must, however, destroy the
resource, not
the parent, which seems a bit upside-down.