MishkaDocument.Resources.Changes.DestroyClones (Mishka Document v0.0.1)

Copy Markdown View Source

Deleting a version deletes every version cloned from it, however deep, each through the same delete (:destroy, under the version's site) with the same actor — so each is refused, deleted with its pages and notes, logged and broadcast as its own delete would be. The database's source_version_id reference deletes a clone too, for a delete made past the action.

Refused, with nothing deleted, when a version that would go with it is the latest of its document, so the latest is never deleted through another.

destroy :destroy do
  change MishkaDocument.Resources.Changes.DestroyClones
end