diff options
Diffstat (limited to 'app/models/news.rb')
-rw-r--r-- | app/models/news.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/news.rb b/app/models/news.rb index 969b37a0d..5949a731b 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]} + acts_as_activity_provider :find_options => {:include => [:project, :author]}, + :author_key => :author_id # returns latest news for projects visible by user def self.latest(user = User.current, count = 5) |