issue 1798 ,用户名出现不显示的情况

This commit is contained in:
lizanle 2015-01-14 16:42:12 +08:00
parent 21568fab07
commit 75ba61ed74
1 changed files with 2 additions and 1 deletions

View File

@ -31,7 +31,8 @@ class Document < ActiveRecord::Base
acts_as_searchable :columns => ['title', "#{table_name}.description"], :include => :project acts_as_searchable :columns => ['title', "#{table_name}.description"], :include => :project
acts_as_event :title => Proc.new {|o| "#{l(:label_document)}: #{o.title}"}, 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}} :url => Proc.new {|o| {:controller => 'documents', :action => 'show', :id => o.id}}
acts_as_activity_provider :find_options => {:include => :project}, acts_as_activity_provider :find_options => {:include => :project},
:is_public => 'documents.is_public' :is_public => 'documents.is_public'