@@ -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). |
|
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