diff options
Diffstat (limited to 'app/models/document.rb')
-rw-r--r-- | app/models/document.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/document.rb b/app/models/document.rb index 70e3c9b01..810b15dfa 100644 --- a/app/models/document.rb +++ b/app/models/document.rb @@ -22,7 +22,7 @@ class Document < ActiveRecord::Base acts_as_attachable :delete_permission => :delete_documents acts_as_searchable :columns => ['title', "#{table_name}.description"], - :scope => preload(:project) + :preload => :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) }, :url => Proc.new {|o| {:controller => 'documents', :action => 'show', :id => o.id}} |