summaryrefslogtreecommitdiffstats
path: root/app/models/news.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-07-27 17:54:09 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-07-27 17:54:09 +0000
commita774c5c48b5e596770340b6ac27ea9f0a1e1141f (patch)
tree7c0ab261c09324cbef711cba9ab3400d3c610cc2 /app/models/news.rb
parent1721376542af256263d605a16c3981eca9e3733a (diff)
downloadredmine-a774c5c48b5e596770340b6ac27ea9f0a1e1141f.tar.gz
redmine-a774c5c48b5e596770340b6ac27ea9f0a1e1141f.zip
Activity refactoring.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1701 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/news.rb')
-rw-r--r--app/models/news.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/news.rb b/app/models/news.rb
index 71e2a2d5e..4c4943b78 100644
--- a/app/models/news.rb
+++ b/app/models/news.rb
@@ -26,7 +26,8 @@ class News < ActiveRecord::Base
acts_as_searchable :columns => ['title', "#{table_name}.description"], :include => :project
acts_as_event :url => Proc.new {|o| {:controller => 'news', :action => 'show', :id => o.id}}
-
+ acts_as_activity_provider :find_options => {:include => [:project, :author]}
+
# returns latest news for projects visible by user
def self.latest(user=nil, count=5)
find(:all, :limit => count, :conditions => Project.visible_by(user), :include => [ :author, :project ], :order => "#{News.table_name}.created_on DESC")