From 358e3194d79b9e4503edd48d2179b9f8f2920cd3 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Mon, 1 Feb 2010 18:57:12 +0000 Subject: Refactor: Move recipients method into acts_as_event acts_as_event should be the standard interface to Redmine events, like mail notifications, so having a standard recipients implementation there makes sense. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3358 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- vendor/plugins/acts_as_event/lib/acts_as_event.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'vendor/plugins/acts_as_event/lib') diff --git a/vendor/plugins/acts_as_event/lib/acts_as_event.rb b/vendor/plugins/acts_as_event/lib/acts_as_event.rb index 0b7ad21f5..1aa7ddf01 100644 --- a/vendor/plugins/acts_as_event/lib/acts_as_event.rb +++ b/vendor/plugins/acts_as_event/lib/acts_as_event.rb @@ -68,6 +68,13 @@ module Redmine (option.is_a?(Proc) ? option.call(self) : send(option)).merge(options) end + # Returns the mail adresses of users that should be notified + def recipients + notified = project.notified_users + notified.reject! {|user| !visible?(user)} + notified.collect(&:mail) + end + module ClassMethods end end -- cgit v1.2.3