From: Toshi MARUYAMA Date: Wed, 8 Jan 2014 12:19:59 +0000 (+0000) Subject: Rails4: replace deprecated Relation#update_all at Group model X-Git-Tag: 2.5.0~370 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9f079015bf355ac2a67d1a6260b3e9d25ae8ef49;p=redmine.git Rails4: replace deprecated Relation#update_all at Group model git-svn-id: http://svn.redmine.org/redmine/trunk@12529 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/group.rb b/app/models/group.rb index 3e4bdf09a..5d49a138a 100644 --- a/app/models/group.rb +++ b/app/models/group.rb @@ -87,6 +87,6 @@ class Group < Principal def remove_references_before_destroy return if self.id.nil? - Issue.update_all 'assigned_to_id = NULL', ['assigned_to_id = ?', id] + Issue.where(['assigned_to_id = ?', id]).update_all('assigned_to_id = NULL') end end