12 lines
472 B
Ruby
12 lines
472 B
Ruby
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'
|
|
|
|
validates_presence_of :notificationcommented, :author, :notificationcomments
|
|
|
|
safe_attributes 'notificationcomments'
|
|
end
|