@@ -22,7 +22,10 class Message < ActiveRecord::Base | |||||
22 | has_many :attachments, :as => :container, :dependent => :destroy |
|
22 | has_many :attachments, :as => :container, :dependent => :destroy | |
23 | belongs_to :last_reply, :class_name => 'Message', :foreign_key => 'last_reply_id' |
|
23 | belongs_to :last_reply, :class_name => 'Message', :foreign_key => 'last_reply_id' | |
24 |
|
24 | |||
25 |
acts_as_searchable :columns => ['subject', 'content'], |
|
25 | acts_as_searchable :columns => ['subject', 'content'], | |
|
26 | :include => :board, | |||
|
27 | :project_key => 'project_id', | |||
|
28 | :date_column => 'created_on' | |||
26 | acts_as_event :title => Proc.new {|o| "#{o.board.name}: #{o.subject}"}, |
|
29 | acts_as_event :title => Proc.new {|o| "#{o.board.name}: #{o.subject}"}, | |
27 | :description => :content, |
|
30 | :description => :content, | |
28 | :url => Proc.new {|o| {:controller => 'messages', :action => 'show', :board_id => o.board_id, :id => o.id}} |
|
31 | :url => Proc.new {|o| {:controller => 'messages', :action => 'show', :board_id => o.board_id, :id => o.id}} |
General Comments 0
You need to be logged in to leave comments.
Login now