2014-06-05 10:28:36 +08:00
|
|
|
class Notificationcomments < ActiveRecord::Base
|
|
|
|
attr_accessible :author_id, :notificationcommented_id, :notificationcommented_type, :notificationcomments
|
|
|
|
|
|
|
|
include Redmine::SafeAttributes
|
|
|
|
belongs_to :notificationcommented, :polymorphic => true, :counter_cache => true
|
|
|
|
belongs_to :author, :class_name => 'User', :foreign_key => 'author_id'
|
|
|
|
|
2014-06-05 11:19:59 +08:00
|
|
|
validates_presence_of :notificationcommented, :author, :notificationcomments
|
2014-06-05 10:28:36 +08:00
|
|
|
|
|
|
|
safe_attributes 'notificationcomments'
|
|
|
|
end
|