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


147
148
149
150
151
152
153
# File 'lib/redmine/nested_set/project_nested_set.rb', line 147

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