From 30e3e7e0b4b2b0ad400efd7947c909341a5948a0 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Wed, 8 Jan 2014 04:58:13 +0000 Subject: [PATCH] Rails4: replace deprecated Relation#update_all at Member model git-svn-id: http://svn.redmine.org/redmine/trunk@12512 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/member.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/member.rb b/app/models/member.rb index b11086061..40010379a 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -84,7 +84,8 @@ class Member < ActiveRecord::Base def set_issue_category_nil if user # remove category based auto assignments for this member - IssueCategory.update_all "assigned_to_id = NULL", ["project_id = ? AND assigned_to_id = ?", project.id, user.id] + IssueCategory.where(["project_id = ? AND assigned_to_id = ?", project.id, user.id]). + update_all("assigned_to_id = NULL") end end -- 2.39.5