diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-07-20 17:26:07 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-07-20 17:26:07 +0000 |
commit | be2b8a62f4d0d8bf413a5583fe644bd41a8ebf04 (patch) | |
tree | 95fe7f273935739e1ffa82be16cee93927a4c054 /app/models/issue.rb | |
parent | 83baccb71ac0e609ce72ebf322f73884548a9ba5 (diff) | |
download | redmine-be2b8a62f4d0d8bf413a5583fe644bd41a8ebf04.tar.gz redmine-be2b8a62f4d0d8bf413a5583fe644bd41a8ebf04.zip |
Search engine: display total results count (#906) and count by result type.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1681 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r-- | app/models/issue.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index b19e64883..cae603dd8 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -35,7 +35,10 @@ class Issue < ActiveRecord::Base acts_as_customizable acts_as_watchable - acts_as_searchable :columns => ['subject', "#{table_name}.description"], :include => :project, :with => {:journal => :issue} + acts_as_searchable :columns => ['subject', "#{table_name}.description", "#{Journal.table_name}.notes"], + :include => [:project, :journals], + # sort by id so that limited eager loading doesn't break with postgresql + :order_column => "#{table_name}.id" acts_as_event :title => Proc.new {|o| "#{o.tracker.name} ##{o.id}: #{o.subject}"}, :url => Proc.new {|o| {:controller => 'issues', :action => 'show', :id => o.id}} |