Added watchers for message boards (watchers controller modified to support any watchable model).

No notification yet when a new message is posted.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@530 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-05-13 19:43:35 +00:00
parent b90e84b9fe
commit bca5bd9c62
7 changed files with 42 additions and 14 deletions
+1
View File
@@ -21,6 +21,7 @@ class Board < ActiveRecord::Base
has_many :messages, :dependent => :delete_all, :order => "#{Message.table_name}.created_on DESC"
belongs_to :last_message, :class_name => 'Message', :foreign_key => :last_message_id
acts_as_list :scope => :project_id
acts_as_watchable
validates_presence_of :name, :description
validates_length_of :name, :maximum => 30