summaryrefslogtreecommitdiffstats
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-09 02:37:06 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-09 02:37:06 +0000
commitecda4d33e83be9971159713934b82e960e2e01ca (patch)
tree60d844d18e2d4f62daeec3f864c50d7dccf0fe06 /app/models/user.rb
parent09884154c9b60894c0107bd3ce42c5a4489998c9 (diff)
downloadredmine-ecda4d33e83be9971159713934b82e960e2e01ca.tar.gz
redmine-ecda4d33e83be9971159713934b82e960e2e01ca.zip
Rails4: replace deprecated Relation#update_all at User model
git-svn-id: http://svn.redmine.org/redmine/trunk@12544 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index a88aef8dc..189a9d9d6 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -681,7 +681,7 @@ class User < Principal
News.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
# Remove private queries and keep public ones
::Query.delete_all ['user_id = ? AND visibility = ?', id, ::Query::VISIBILITY_PRIVATE]
- ::Query.update_all ['user_id = ?', substitute.id], ['user_id = ?', id]
+ ::Query.where(['user_id = ?', id]).update_all(['user_id = ?', substitute.id])
TimeEntry.where(['user_id = ?', id]).update_all(['user_id = ?', substitute.id])
Token.delete_all ['user_id = ?', id]
Watcher.delete_all ['user_id = ?', id]