]> source.dussan.org Git - redmine.git/commitdiff
remove unneeded Relation#all from Watcher#prune
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 08:35:10 +0000 (08:35 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 08:35:10 +0000 (08:35 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12572 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/watcher.rb

index 53756603c89f61e294b4949a55d48f9f47201684..104b076fd04e3e95a3e77b3b1b514bff84f3155f 100644 (file)
@@ -42,7 +42,7 @@ class Watcher < ActiveRecord::Base
       prune_single_user(options[:user], options)
     else
       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)
       end
       pruned