From d7f986b6a8f2f82836ee6285aa8d1230274c9d80 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 9 Jan 2014 04:23:36 +0000 Subject: [PATCH] Rails4: replace deprecated Relation#update_all at ProjectNestedSetTest git-svn-id: http://svn.redmine.org/redmine/trunk@12552 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/project_nested_set_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/project_nested_set_test.rb b/test/unit/project_nested_set_test.rb index a65a4b8df..6048cd23d 100644 --- a/test/unit/project_nested_set_test.rb +++ b/test/unit/project_nested_set_test.rb @@ -55,7 +55,7 @@ class ProjectNestedSetTest < ActiveSupport::TestCase end def test_rebuild_tree_should_build_valid_tree_even_with_valid_lft_rgt_values - Project.update_all "name = 'YY'", {:id => @a.id } + Project.where({:id => @a.id }).update_all("name = 'YY'") # lft and rgt values are still valid (Project.rebuild! would not update anything) # but projects are not ordered properly (YY is in the first place)