|
|
|
@ -1,10 +1,10 @@
|
|
|
|
|
class Contestnotification < ActiveRecord::Base
|
|
|
|
|
attr_accessible :author_id, :comments_count, :contest_id, :description, :summary, :title
|
|
|
|
|
attr_accessible :author_id, :notificationcomments_count, :contest_id, :description, :summary, :title
|
|
|
|
|
|
|
|
|
|
include Redmine::SafeAttributes
|
|
|
|
|
belongs_to :contest
|
|
|
|
|
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
|
|
|
|
|
has_many :comments, :as => :commented, :dependent => :delete_all, :order => "created_at"
|
|
|
|
|
has_many :notificationcomments, :as => :notificationcommented, :dependent => :delete_all, :order => "created_at"
|
|
|
|
|
# fq
|
|
|
|
|
has_many :acts, :class_name => 'Activity', :as => :act, :dependent => :destroy
|
|
|
|
|
|
|
|
|
|