Skip to content

dependent: :delete_all only deletes direct children #242

Open
@yijia-zhan

Description

@yijia-zhan
class Tag
  has_closure_tree dependent: :delete_all
end

With the code above, @tag.destroy only deletes @tag's direct children. Its grandchildren are all orphaned, keeping old parent_ids which no longer exist. However, the hierarchy records of all direct children and grandchildren do get deleted though. Is this intended?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions