<commit_before>class Activity < ActiveRecord::Base

  ###############################
  ## RELATIONSHIPS
  belongs_to :project
  belongs_to :project_type
  has_many :timestamps, dependent: :destroy


  ###############################
  ## ATTRIBUTES
  attr_accessible :id, :name, :project_type_id, :active, :notes


  ###############################
  ## VALIDATIONS
  validates :name, :project_id, :project_type_id, :presence => true

  ###############################
  ## SCOPES
  scope :is_active, where(active: true)

  ###############################
  ## METHODS
  def full_name
    "#{name} (#{project_type.name})"
  end

  def full_name_with_project<commit_msg>Bug fixed - new project was not created with activities<commit_after>class Activity < ActiveRecord::Base

  ###############################
  ## RELATIONSHIPS
  belongs_to :project
  belongs_to :project_type
  has_many :timestamps, dependent: :destroy


  ###############################
  ## ATTRIBUTES
  attr_accessible :id, :name, :project_type_id, :active, :notes


  ###############################
  ## VALIDATIONS
  validates :name, :project_type_id, :presence => true

  ###############################
  ## SCOPES
  scope :is_active, where(active: true)

  ###############################
  ## METHODS
  def full_name
    "#{name} (#{project_type.name})"
  end

  def full_name_with_project
{'fraction_non_alphanumeric': 0.3075237399561724, 'fraction_numerical': 0.0, 'mean_word_length': 5.462264150943396, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '78198', 'n_tokens_mistral': 436, 'n_tokens_neox': 410, 'n_words': 84}