diff --git a/app/models/document.rb b/app/models/document.rb index e607b9292..e2e0a8d00 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -31,7 +31,8 @@ class Document < ActiveRecord::Base acts_as_searchable :columns => ['title', "#{table_name}.description"], :include => :project acts_as_event :title => Proc.new {|o| "#{l(:label_document)}: #{o.title}"}, - :author => Proc.new {|o| o.attachments.reorder("#{Attachment.table_name}.created_on ASC").first.try(:author) }, + #:author => Proc.new {|o| o.attachments.reorder("#{Attachment.table_name}.created_on ASC").first.try(:author) }, + :author => Proc.new {|o| User.find(o.user_id)}, :url => Proc.new {|o| {:controller => 'documents', :action => 'show', :id => o.id}} acts_as_activity_provider :find_options => {:include => :project}, :is_public => 'documents.is_public'