<commit_before>class Topic < ActiveRecord::Base
  attr_accessible :description, :subject

  validates :subject,     :presence => { :message => "for topic can't be blank" }
  validates :description, :presence => { :message => "for topic can't be blank" }

  belongs_to :discussion_board

  has_many :posts, :dependent => :destroy

  def user
    discussion_board.user
  end

  def last_updated_time
    updated_at
  end

  def club
    discussion_board.club
  end
end<commit_msg>Update Topic Model for poster Method<commit_after>class Topic < ActiveRecord::Base
  attr_accessible :description, :subject, :user_id

  validates :subject,     :presence => { :message => "for topic can't be blank" }
  validates :description, :presence => { :message => "for topic can't be blank" }

  belongs_to :discussion_board

  has_many :posts, :dependent => :destroy

  def poster
    begin
      User.try(:find, user_id)
    rescue
      'unknown'
    end
  end

  def last_updated_time
    updated_at
  end

  def club
    discussion_board.club
  end
end
{'fraction_non_alphanumeric': 0.09221902017291066, 'fraction_numerical': 0.0, 'mean_word_length': 3.5701754385964914, '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': '7014920', 'n_tokens_mistral': 337, 'n_tokens_neox': 319, 'n_words': 96}