|
|
|
@ -23,7 +23,7 @@ class News < ActiveRecord::Base
|
|
|
|
|
#added by nwb
|
|
|
|
|
belongs_to :course
|
|
|
|
|
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
|
|
|
|
|
has_many :comments, :as => :commented, :dependent => :delete_all, :order => "created_on"
|
|
|
|
|
has_many :comments, :as => :commented, :dependent => :destroy, :order => "created_on"
|
|
|
|
|
# fq
|
|
|
|
|
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
|
|
|
|
|
# 被ForgeActivity虚拟关联
|
|
|
|
|