diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-18 16:15:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-18 16:15:22 +0000 |
commit | 073818f8bc46580e118a7550f1faaa55b3be13d9 (patch) | |
tree | 6ea9ab7a218ecdac7f4fba61f339e17d0459f04d /app/models/message.rb | |
parent | 1907c31138d065aea93f53b8e7565e06a44e49f8 (diff) | |
download | redmine-073818f8bc46580e118a7550f1faaa55b3be13d9.tar.gz redmine-073818f8bc46580e118a7550f1faaa55b3be13d9.zip |
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
Diffstat (limited to 'app/models/message.rb')
-rw-r--r-- | app/models/message.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/message.rb b/app/models/message.rb index a18d126c9..f57b90985 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -23,9 +23,9 @@ class Message < ActiveRecord::Base belongs_to :last_reply, :class_name => 'Message', :foreign_key => 'last_reply_id' acts_as_searchable :columns => ['subject', 'content'], - :include => :board, + :include => {:board, :project}, :project_key => 'project_id', - :date_column => 'created_on' + :date_column => "#{table_name}.created_on" acts_as_event :title => Proc.new {|o| "#{o.board.name}: #{o.subject}"}, :description => :content, :type => Proc.new {|o| o.parent_id.nil? ? 'message' : 'reply'}, |