remove unneeded Relation#all from Watcher#prune_single_user

git-svn-id: http://svn.redmine.org/redmine/trunk@12569 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-01-09 07:41:50 +00:00
parent 05aa146fad
commit 6dbb9c3677
1 changed files with 1 additions and 1 deletions

View 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) &&