summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-13 13:06:57 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-12-13 13:06:57 +0000
commit6610bb6b6cbb1ef72787542063359de04fbab6be (patch)
treedeaea217c039928150c7aaeb683a58be8afb50ec /vendor
parentf33231181f9591ee67577e229a8bf6de24516ba0 (diff)
downloadredmine-6610bb6b6cbb1ef72787542063359de04fbab6be.tar.gz
redmine-6610bb6b6cbb1ef72787542063359de04fbab6be.zip
Moves watchers filtering logic to ActsAsWatchable.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3168 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'vendor')
-rw-r--r--vendor/plugins/acts_as_watchable/lib/acts_as_watchable.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/vendor/plugins/acts_as_watchable/lib/acts_as_watchable.rb b/vendor/plugins/acts_as_watchable/lib/acts_as_watchable.rb
index 977ab4fc7..c13da4fd4 100644
--- a/vendor/plugins/acts_as_watchable/lib/acts_as_watchable.rb
+++ b/vendor/plugins/acts_as_watchable/lib/acts_as_watchable.rb
@@ -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