socialforge/app/models/notificationcomment.rb

13 lines
508 B
Ruby
Raw Normal View History

2014-06-06 21:40:58 +08:00
class Notificationcomment < ActiveRecord::Base
2014-06-05 10:28:36 +08:00
attr_accessible :author_id, :notificationcommented_id, :notificationcommented_type, :notificationcomments
include Redmine::SafeAttributes
2014-06-07 10:02:00 +08:00
belongs_to :notificationcommented, :polymorphic => true#, :counter_cache => true
2014-06-05 10:28:36 +08:00
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
2014-08-04 15:01:39 +08:00
belongs_to :Contestnotification
2014-06-05 10:28:36 +08:00
2014-06-05 11:19:59 +08:00
validates_presence_of :notificationcommented, :author, :notificationcomments
2014-06-05 10:28:36 +08:00
2014-06-07 10:02:00 +08:00
# safe_attributes 'notificationcomments'
2014-06-05 10:28:36 +08:00
end