notified.collect(&:mail)
end
- # Returns the mail adresses of watchers that should be notified
- def watcher_recipients
- notified = watcher_users
- notified.reject! {|user| !user.active? || !visible?(user)}
- notified.collect(&:mail)
- end
-
# Returns the total number of hours spent on this issue.
#
# Example:
# 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