Added a before_save callback for cache_depth #74

Merged
merged 1 commit into from May 7, 2013

4 participants

@scottatron

Hey there, here's my attempt at addressing issue #64.

Added a before_save callback for cache_depth as well as the existing before_validation callback. This ensures that all descendants in a subtree have their depth cache updated when the subtree is moved.

@scottatron scottatron Added a before_save callback for cache_depth as well as the existing …
…before_validation callback. This ensures that all descendants in a subtree have their depth cache updated when the subtree is moved.
47c331e
@holstvoogd

This seems to be the resolution to issue #64.
Shouldn't we maybe try to only update when the ancestry is actually changed? For efficiency sake?

@mguinada

Will this be merged?

+1

@StefanH StefanH merged commit eab6357 into stefankroes:master May 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment