remove unneeded Relation#all from Watcher#prune
git-svn-id: http://svn.redmine.org/redmine/trunk@12572 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
907663f83c
commit
ac72e7a8d5
|
@ -42,7 +42,7 @@ class Watcher < ActiveRecord::Base
|
||||||
prune_single_user(options[:user], options)
|
prune_single_user(options[:user], options)
|
||||||
else
|
else
|
||||||
pruned = 0
|
pruned = 0
|
||||||
User.where("id IN (SELECT DISTINCT user_id FROM #{table_name})").all.each do |user|
|
User.where("id IN (SELECT DISTINCT user_id FROM #{table_name})").each do |user|
|
||||||
pruned += prune_single_user(user, options)
|
pruned += prune_single_user(user, options)
|
||||||
end
|
end
|
||||||
pruned
|
pruned
|
||||||
|
|
Loading…
Reference in New Issue