From 55ed70529aefdb3029f5ab72169b2f7909b2f2a3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 10 Dec 2006 18:35:48 +0000 Subject: added model Comment. comments can now be added on news. git-svn-id: http://redmine.rubyforge.org/svn/trunk@81 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/news.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/models/news.rb') diff --git a/app/models/news.rb b/app/models/news.rb index faafa7eef..f9ba010b0 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -18,6 +18,7 @@ class News < ActiveRecord::Base belongs_to :project belongs_to :author, :class_name => 'User', :foreign_key => 'author_id' + has_many :comments, :as => :commented, :dependent => true, :order => "created_on" validates_presence_of :title, :description -- cgit v1.2.3