-
-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add errors when node cant be deleted (#1828)
* Add error before destroying node with attached essence Nodes that are used on e.g. content pages can not be simply destroyed. This commit adds an error message so the user knows what's going on. * Do not destroy nodes with dependent nodes that are in use on a page This moves the validation up in the file so that awesome_nested_set does not run its `delete_all` callback before we validate that it can do that. It also extends the validation such that we collect all the pages that are referenced in the subtree below this node.
- Loading branch information
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters