Added a before_save callback for cache_depth #74

Merged
merged 1 commit into from May 7, 2013

Conversation

Projects
None yet
4 participants
Contributor

scottatron commented Sep 13, 2011

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

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?

Will this be merged?

+1

@StefanH StefanH added a commit that referenced this pull request May 7, 2013

@StefanH StefanH Merge pull request #74 from scottatron/master
Added a before_save callback for cache_depth
eab6357

@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