socialforge/app/models/notificationcomment.rb

12 lines
474 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'
validates_presence_of :notificationcommented, :author, :notificationcomments
# safe_attributes 'notificationcomments'
end