diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-02-01 18:57:12 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-02-01 18:57:12 +0000 |
commit | 358e3194d79b9e4503edd48d2179b9f8f2920cd3 (patch) | |
tree | b756b0e53207d924b805398028bae104da2b1019 /vendor | |
parent | d43c860448ce71ca3f35ac6487775deaa0dcb3c3 (diff) | |
download | redmine-358e3194d79b9e4503edd48d2179b9f8f2920cd3.tar.gz redmine-358e3194d79b9e4503edd48d2179b9f8f2920cd3.zip |
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
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/plugins/acts_as_event/lib/acts_as_event.rb | 7 |
1 files changed, 7 insertions, 0 deletions
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 |