summaryrefslogtreecommitdiffstats
path: root/app/models/attachment.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-11-30 11:18:22 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-11-30 11:18:22 +0000
commitfce4615f10ad81b9070e65a45f9d37b1c571ccd7 (patch)
treeb922752605cd207cf51e72866f435af8427ea468 /app/models/attachment.rb
parentb5fcea9e7414647533ee333485ed8c93b9cff82f (diff)
downloadredmine-fce4615f10ad81b9070e65a45f9d37b1c571ccd7.tar.gz
redmine-fce4615f10ad81b9070e65a45f9d37b1c571ccd7.zip
Display latest user's activity on account/show view.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2066 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/attachment.rb')
-rw-r--r--app/models/attachment.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/attachment.rb b/app/models/attachment.rb
index 95ba8491f..f838076c6 100644
--- a/app/models/attachment.rb
+++ b/app/models/attachment.rb
@@ -30,12 +30,14 @@ class Attachment < ActiveRecord::Base
acts_as_activity_provider :type => 'files',
:permission => :view_files,
+ :author_key => :author_id,
:find_options => {:select => "#{Attachment.table_name}.*",
:joins => "LEFT JOIN #{Version.table_name} ON #{Attachment.table_name}.container_type='Version' AND #{Version.table_name}.id = #{Attachment.table_name}.container_id " +
"LEFT JOIN #{Project.table_name} ON #{Version.table_name}.project_id = #{Project.table_name}.id"}
acts_as_activity_provider :type => 'documents',
:permission => :view_documents,
+ :author_key => :author_id,
:find_options => {:select => "#{Attachment.table_name}.*",
:joins => "LEFT JOIN #{Document.table_name} ON #{Attachment.table_name}.container_type='Document' AND #{Document.table_name}.id = #{Attachment.table_name}.container_id " +
"LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id"}