summaryrefslogtreecommitdiffstats
path: root/lib/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lib/plugins')
-rw-r--r--lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb b/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb
index b101a5ef2..797ce2ab5 100644
--- a/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb
+++ b/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb
@@ -590,6 +590,8 @@ module CollectiveIdea #:nodoc:
["#{quoted_right_column_name} = (#{quoted_right_column_name} - ?)", diff]
)
+ # Reload is needed because children may have updated their parent (self) during deletion.
+ reload
# Don't allow multiple calls to destroy to corrupt the set
self.skip_before_destroy = true
end