summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-14 11:21:16 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-07-14 11:21:16 +0000
commit26c5459de7a525ec4427b33f9c80b7f0c531db78 (patch)
tree6f819fec3aedd3b98bcce749a259f86becb44ea8 /app
parent2e4e610930cda0a800bced31f2ab0a473fd384e2 (diff)
downloadredmine-26c5459de7a525ec4427b33f9c80b7f0c531db78.tar.gz
redmine-26c5459de7a525ec4427b33f9c80b7f0c531db78.zip
Don't pass conditions to #delete_all.
git-svn-id: http://svn.redmine.org/redmine/trunk@15662 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 69db92240..a9b2be54d 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -820,11 +820,11 @@ class User < Principal
Message.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
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.where('user_id = ? AND visibility = ?', id, ::Query::VISIBILITY_PRIVATE).delete_all
::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]
+ Token.where('user_id = ?', id).delete_all
+ Watcher.where('user_id = ?', id).delete_all
WikiContent.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
WikiContent::Version.where(['author_id = ?', id]).update_all(['author_id = ?', substitute.id])
end