##// END OF EJS Templates
remove unneeded Relation#all from Watcher#prune_single_user...
Toshi MARUYAMA -
r12294:6dbb9c3677c3
parent child
Show More
@@ -60,7 +60,7 class Watcher < ActiveRecord::Base
60 def self.prune_single_user(user, options={})
60 def self.prune_single_user(user, options={})
61 return unless user.is_a?(User)
61 return unless user.is_a?(User)
62 pruned = 0
62 pruned = 0
63 where(:user_id => user.id).all.each do |watcher|
63 where(:user_id => user.id).each do |watcher|
64 next if watcher.watchable.nil?
64 next if watcher.watchable.nil?
65 if options.has_key?(:project)
65 if options.has_key?(:project)
66 unless watcher.watchable.respond_to?(:project) &&
66 unless watcher.watchable.respond_to?(:project) &&
General Comments 0
You need to be logged in to leave comments. Login now