summaryrefslogtreecommitdiffstats
path: root/app/models/news.rb
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-02-01 18:57:12 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-02-01 18:57:12 +0000
commit358e3194d79b9e4503edd48d2179b9f8f2920cd3 (patch)
treeb756b0e53207d924b805398028bae104da2b1019 /app/models/news.rb
parentd43c860448ce71ca3f35ac6487775deaa0dcb3c3 (diff)
downloadredmine-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 'app/models/news.rb')
-rw-r--r--app/models/news.rb7
1 files changed, 0 insertions, 7 deletions
diff --git a/app/models/news.rb b/app/models/news.rb
index a7b173439..a167cdf38 100644
--- a/app/models/news.rb
+++ b/app/models/news.rb
@@ -33,13 +33,6 @@ class News < ActiveRecord::Base
!user.nil? && user.allowed_to?(:view_news, project)
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
-
# returns latest news for projects visible by user
def self.latest(user = User.current, count = 5)
find(:all, :limit => count, :conditions => Project.allowed_to_condition(user, :view_news), :include => [ :author, :project ], :order => "#{News.table_name}.created_on DESC")