<commit_before>require "tralala/version"

module Tralala

  extend ActiveSupport::Concern

  def dingdingdong
    callstack = caller.reject{|cs| cs.include?('active_record')}
    puts ""
    puts "\e[34mIm You touched me tralala!\e[0m"
    puts "  -- #{callstack[1].split(' ').first}"
  end

  private

  def save(options={})
    dingdingdong
    super
  end

end

ActiveRecord::Validations.send(:include, Tralala)<commit_msg>Fix bug where tralala never gets touched in v3.0.x<commit_after>require "tralala/version"

module Tralala

  extend ActiveSupport::Concern

  def dingdingdong
    callstack = caller.reject{|cs| cs.include?('active_record')}
    puts ""
    puts "\e[34mIm You touched my tralala!\e[0m"
    puts "  -- #{callstack[1].split(' ').first}"
  end

  def save(*)
    dingdingdong
    super
  end

  def save!(*)
    dingdingdong
    super
  end

end

ActiveRecord::Base.send(:include, Tralala)
{'fraction_non_alphanumeric': 0.12733260153677278, 'fraction_numerical': 0.010976948408342482, 'mean_word_length': 3.537313432835821, 'pattern_counts': {'":': 0, '<': 3, '<?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': '7079469', 'n_tokens_mistral': 339, 'n_tokens_neox': 319, 'n_words': 73}