]> source.dussan.org Git - redmine.git/commitdiff
Rails4: replace deprecated Relation#update_all at Group model
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Jan 2014 12:19:59 +0000 (12:19 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 8 Jan 2014 12:19:59 +0000 (12:19 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12529 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/group.rb

index 3e4bdf09a790dab1e02b313258285de12a39e74a..5d49a138abb36b9dac0442ff0890871ddb251df0 100644 (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