<commit_before>class Project < ActiveRecord::Base
  belongs_to    :company
  belongs_to    :customer
  belongs_to    :owner, :class_name => "User", :foreign_key => "user_id"

  has_many      :users, :through => :project_permissions
  has_many      :project_permissions, :dependent => :destroy
  has_many      :pages, :dependent => :destroy
  has_many      :tasks
  has_many      :sheets
  has_many      :work_logs
  has_many      :activities
  has_many      :project_files, :dependent => :destroy
  has_many      :milestones, :dependent => :destroy

  has_many      :forums, :dependent => :destroy

  validates_length_of           :name,  :maximum=>200
  validates_presence_of         :name

  after_create { |r|
    f = Forum.new
    f.company_id = r.company_id
    f.project_id = r.id
    f.name = r.full_name
    f.save
  }

  def full_name
    "#{customer.name} / #{name}"
  end
<commit_msg>[ClockingIT @ Delete project folders when deleting project]<commit_after>class Project < ActiveRecord::Base
  belongs_to    :company
  belongs_to    :customer
  belongs_to    :owner, :class_name => "User", :foreign_key => "user_id"

  has_many      :users, :through => :project_permissions
  has_many      :project_permissions, :dependent => :destroy
  has_many      :pages, :dependent => :destroy
  has_many      :tasks
  has_many      :sheets
  has_many      :work_logs
  has_many      :activities
  has_many      :project_files, :dependent => :destroy
  has_many      :project_folders, :dependent => :destroy
  has_many      :milestones, :dependent => :destroy

  has_many      :forums, :dependent => :destroy

  validates_length_of           :name,  :maximum=>200
  validates_presence_of         :name

  after_create { |r|
    f = Forum.new
    f.company_id = r.company_id
    f.project_id = r.id
    f.name = r.full_name
    f.save
  }

  def full_name
    "#{customer.name} / #{name}"
  end

{'fraction_non_alphanumeric': 0.10301109350237718, 'fraction_numerical': 0.003169572107765452, 'mean_word_length': 2.834008097165992, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 22, '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': '2058142', 'n_tokens_mistral': 646, 'n_tokens_neox': 630, 'n_words': 142}