diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-12-10 18:35:48 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2006-12-10 18:35:48 +0000 |
commit | 55ed70529aefdb3029f5ab72169b2f7909b2f2a3 (patch) | |
tree | 1f1dbf48685483905949c121cafe36e26c7efc7c /app/models/news.rb | |
parent | 28c6aa4e6dfe7b4261cd4b4feb50eda62ace0572 (diff) | |
download | redmine-55ed70529aefdb3029f5ab72169b2f7909b2f2a3.tar.gz redmine-55ed70529aefdb3029f5ab72169b2f7909b2f2a3.zip |
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
Diffstat (limited to 'app/models/news.rb')
-rw-r--r-- | app/models/news.rb | 1 |
1 files changed, 1 insertions, 0 deletions
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
|