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



167
168
169
170
171
172
173
# File 'lib/redmine/nested_set/project_nested_set.rb', line 167

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