Rails4: replace deprecated Relation#update_all at Group model

git-svn-id: http://svn.redmine.org/redmine/trunk@12529 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-01-08 12:19:59 +00:00
parent 599ac20570
commit 9f079015bf
1 changed files with 1 additions and 1 deletions

View File

@ -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