summaryrefslogtreecommitdiffstats
path: root/app/models/message.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-27 22:24:09 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-27 22:24:09 +0000
commit66c8c1e29249505d2cf949293454e676b9726154 (patch)
treebe995fb5f628b347354ffd2fdf5b757cbd68106a /app/models/message.rb
parent05e27d0d836b78827fc8868ceda6c7a2083ef39f (diff)
downloadredmine-66c8c1e29249505d2cf949293454e676b9726154.tar.gz
redmine-66c8c1e29249505d2cf949293454e676b9726154.zip
Fixed: unable to migrate from an empty database.
(Message model is loaded at startup, which fails if it doesn't exist) git-svn-id: http://redmine.rubyforge.org/svn/trunk@771 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/message.rb')
-rw-r--r--app/models/message.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/message.rb b/app/models/message.rb
index b48fb2557..909c06a9e 100644
--- a/app/models/message.rb
+++ b/app/models/message.rb
@@ -22,7 +22,10 @@ class Message < ActiveRecord::Base
has_many :attachments, :as => :container, :dependent => :destroy
belongs_to :last_reply, :class_name => 'Message', :foreign_key => 'last_reply_id'
- acts_as_searchable :columns => ['subject', 'content'], :include => :board, :project_key => "project_id"
+ acts_as_searchable :columns => ['subject', 'content'],
+ :include => :board,
+ :project_key => 'project_id',
+ :date_column => 'created_on'
acts_as_event :title => Proc.new {|o| "#{o.board.name}: #{o.subject}"},
:description => :content,
:url => Proc.new {|o| {:controller => 'messages', :action => 'show', :board_id => o.board_id, :id => o.id}}