Fixed: error on activity page when displaying a document (undefined method 'author').
git-svn-id: http://redmine.rubyforge.org/svn/trunk@896 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
362364fd6f
commit
a8419c1425
|
@ -22,6 +22,7 @@ class Document < ActiveRecord::Base
|
||||||
|
|
||||||
acts_as_searchable :columns => ['title', 'description']
|
acts_as_searchable :columns => ['title', 'description']
|
||||||
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| (a = o.attachments.find(:first, :order => "#{Attachment.table_name}.created_on ASC")) ? a.author : nil },
|
||||||
:url => Proc.new {|o| {:controller => 'documents', :action => 'show', :id => o.id}}
|
:url => Proc.new {|o| {:controller => 'documents', :action => 'show', :id => o.id}}
|
||||||
|
|
||||||
validates_presence_of :project, :title, :category
|
validates_presence_of :project, :title, :category
|
||||||
|
|
Loading…
Reference in New Issue