<commit_before>class Rating < ActiveRecord::Base
  belongs_to :user
  belongs_to :rateable, :polymorphic => true, :counter_cache => true 
  
  after_save :update_average
  
  private
  def update_average
    self.rateable.ratings_average = self.rateable.ratings.average(:rating) || 0
    self.rateable.save!
  end
end<commit_msg>No timestamp-update on rating<commit_after>class Rating < ActiveRecord::Base
  belongs_to :user
  belongs_to :rateable, :polymorphic => true, :counter_cache => true 
  
  after_save :update_average
  
  private
  def update_average
    self.rateable.ratings_average = self.rateable.ratings.average(:rating) || 0
    self.rateable.class.record_timestamps = false
    self.rateable.save!
    self.rateable.class.record_timestamps = true
  end
end
{'fraction_non_alphanumeric': 0.09184993531694696, 'fraction_numerical': 0.00258732212160414, 'mean_word_length': 4.337931034482758, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '5777260', 'n_tokens_mistral': 264, 'n_tokens_neox': 253, 'n_words': 50}