summaryrefslogtreecommitdiffstats
path: root/app/models/news.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/news.rb')
-rw-r--r--app/models/news.rb1
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