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

app/models/watcher.rb

index 1b887376c5e37f0b270f85ca0bf9a0d31d0f7a4c..53756603c89f61e294b4949a55d48f9f47201684 100644 (file)
@@ -60,7 +60,7 @@ class Watcher < ActiveRecord::Base
   def self.prune_single_user(user, options={})
     return unless user.is_a?(User)
     pruned = 0
-    where(:user_id => user.id).all.each do |watcher|
+    where(:user_id => user.id).each do |watcher|
       next if watcher.watchable.nil?
       if options.has_key?(:project)
         unless watcher.watchable.respond_to?(:project) &&