Hook that prevents a second root from being created.
[Source]
# File lib/sequel/plugins/tree.rb, line 144 144: def before_save 145: if possible_root? && (root = model.root) && pk != root.pk 146: raise TreeMultipleRootError, "there is already a root #{model.name} defined" 147: end 148: super 149: end
[Validate]