]> source.dussan.org Git - redmine.git/commitdiff
Do not trigger model validations when rebuilding the nested set (#10829).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 5 May 2012 09:37:12 +0000 (09:37 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 5 May 2012 09:37:12 +0000 (09:37 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.4-stable@9631 e93f8b46-1217-0410-a6f0-8f06a7374b81

vendor/plugins/awesome_nested_set/lib/awesome_nested_set.rb

index e14b9d75f0bf2ec80d5925deb32817a2e2fcba3a..5cbc319959a969e058cb1491d81026d3dc3d4e8e 100644 (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)