From 9eaa4a7c1a415f6b1136df1390f9dce62e544362 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 7 Jan 2014 14:54:05 +0000 Subject: [PATCH] Rails4: replace deprecated Relation#update_all at Repository model git-svn-id: http://svn.redmine.org/redmine/trunk@12493 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/repository.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index de3ca99a6..9ae09e722 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -402,7 +402,7 @@ class Repository < ActiveRecord::Base self.is_default = true end if is_default? && is_default_changed? - Repository.update_all(["is_default = ?", false], ["project_id = ?", project_id]) + Repository.where(["project_id = ?", project_id]).update_all(["is_default = ?", false]) end end