<commit_before>class Comment < ActiveRecord::Base
  is_reflectable
  has_paper_trail  
  
  #acts_as_nested_set :scope => [:commentable_id, :commentable_type]
  validates_presence_of :body
  validates_presence_of :user
    
  belongs_to :user
  belongs_to :commentable, :polymorphic=>true

  has_many :reflect_bullets, :dependent => :destroy
  has_many :reflect_bullet_revisions, :dependent => :destroy

  # Helper class method that allows you to build a comment
  # by passing a commentable object, a user_id, and comment text<commit_msg>adding polymorphic dependent logic for comments to models<commit_after>class Comment < ActiveRecord::Base
  is_reflectable
  has_paper_trail  
  
  #acts_as_nested_set :scope => [:commentable_id, :commentable_type]
  validates_presence_of :body
  validates_presence_of :user
    
  belongs_to :user
  belongs_to :commentable, :polymorphic=>true

  has_many :reflect_bullets, :class_name => 'Reflect.ReflectBullet', :dependent => :destroy
  has_many :reflect_bullet_revisions, :class_name => 'Reflect.ReflectBulletRevision', :dependent => :destroy

  # Helper class method that allows you to build a comment
  # by passing a commentable object, a user_id, and comment text
{'fraction_non_alphanumeric': 0.07603305785123966, 'fraction_numerical': 0.0, 'mean_word_length': 5.510752688172043, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7447311', 'n_tokens_mistral': 389, 'n_tokens_neox': 380, 'n_words': 102}