<commit_before>class GroupTopicReply < ActiveRecord::Base
  extend HasHtmlPipeline
  belongs_to :topic, class_name: 'GroupTopic', counter_cache: 'replies_count'
  belongs_to :user
  attr_accessible :body, :topic_id, :user_id
  validates :body, presence: true
  has_html_pipeline :body, :markdown

  before_save :update_counters

  private
  def update_counters
    GroupTopic.increment_counter(:replies_count, GroupTopic.find(self.group_topic_id))
    if self.group_topic_id_was.present?
      GroupTopic.decrement_counter(:replies_count, GroupTopic.find(self.group_topic_id_was))
    end
  end
end<commit_msg>remove about before_save code because this has fixed in #421<commit_after>class GroupTopicReply < ActiveRecord::Base
  extend HasHtmlPipeline
  belongs_to :topic, class_name: 'GroupTopic', counter_cache: 'replies_count'
  belongs_to :user
  attr_accessible :body, :topic_id, :user_id
  validates :body, presence: true
  has_html_pipeline :body, :markdown
end
{'fraction_non_alphanumeric': 0.07954545454545454, 'fraction_numerical': 0.0030991735537190084, 'mean_word_length': 6.285714285714286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '4204163', 'n_tokens_mistral': 314, 'n_tokens_neox': 315, 'n_words': 71}