Do not trigger model validations when rebuilding the nested set (#10829).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@9631 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-05-05 09:37:12 +00:00
parent e9ac98b249
commit fa4fdf91a4

View File

@ -184,7 +184,7 @@ module CollectiveIdea #:nodoc:
find(:all, :conditions => ["#{quoted_parent_column_name} = ? #{scope.call(node)}", node], :order => "#{quoted_left_column_name}, #{quoted_right_column_name}, #{acts_as_nested_set_options[:order]}").each{|n| set_left_and_rights.call(n) }
# set right
node[right_column_name] = indices[scope.call(node)] += 1
node.save!
node.save(false)
end
# Find root node(s)