collectiveidea/awesome_nested_set — pull request #256 by codez (2014-05-06 16:05:26+00:00)
Title: Update descendants depth in one query instead of single #save calls

Instead of calling descendants.each(&:save) to update the depth of all descendants, use #update_all to change the depth in one query. This not only improves performance, but also avoids side effects as custom save callbacks of the descendants are not triggered (especially if there is not even a depth column).

This also solves #255.