mirror of
https://github.com/redmine/redmine.git
synced 2025-11-02 03:15:57 +01:00
Ability to search all projects or the projects the user belongs to (#791).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1435 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -20,7 +20,7 @@ class Document < ActiveRecord::Base
|
||||
belongs_to :category, :class_name => "Enumeration", :foreign_key => "category_id"
|
||||
has_many :attachments, :as => :container, :dependent => :destroy
|
||||
|
||||
acts_as_searchable :columns => ['title', 'description']
|
||||
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| (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}}
|
||||
|
||||
Reference in New Issue
Block a user