socialforge/app/models/notificationcomment.rb

13 lines
508 B
Ruby

class Notificationcomment < 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'
belongs_to :Contestnotification
validates_presence_of :notificationcommented, :author, :notificationcomments
# safe_attributes 'notificationcomments'
end