Rails4: replace deprecated Relation#update_all at User model

git-svn-id: http://svn.redmine.org/redmine/trunk@12544 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-01-09 02:37:06 +00:00
parent 09884154c9
commit ecda4d33e8
1 changed files with 1 additions and 1 deletions

View File

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