Module: Redmine::NestedSet::ProjectNestedSet::ClassMethods

Defined in:
lib/redmine/nested_set/project_nested_set.rb

Instance Method Summary collapse

Instance Method Details

#rebuild_tree!Object



137
138
139
140
141
142
143
# File 'lib/redmine/nested_set/project_nested_set.rb', line 137

def rebuild_tree!
  transaction do
    reorder(:id).lock.ids
    update_all(:lft => nil, :rgt => nil)
    rebuild_nodes
  end
end