Moves watchers filtering logic to ActsAsWatchable.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3168 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-12-13 13:06:57 +00:00
parent f33231181f
commit 6610bb6b6c
2 changed files with 5 additions and 8 deletions
+5 -1
View File
@@ -53,7 +53,11 @@ module Redmine
# Returns an array of watchers' email addresses
def watcher_recipients
self.watchers.collect { |w| w.user.mail if w.user.active? }.compact
notified = watchers.collect(&:user).select(&:active?)
if respond_to?(:visible?)
notified.reject! {|user| !visible?(user)}
end
notified.collect(&:mail).compact
end
module ClassMethods