<commit_before>module Filterrific
  class Engine < ::Rails::Engine

    # It's an engine so that we can add javascript and image assets
    # to the asset pipeline.

    isolate_namespace Filterrific

    require 'filterrific/param_set'

    initializer "filterrific" do |app|

      ActiveSupport.on_load :active_record do
        require 'filterrific/active_record_extension'
        class ::ActiveRecord::Base
          extend Filterrific::ActiveRecordExtension::ClassMethods
        end
      end

      ActiveSupport.on_load :action_view do
        require 'filterrific/action_view_extension'
        class ::ActionView::Base
          include Filterrific::ActionViewExtension
        end
      end

      app.config.assets.precompile += %w(filterrific-spinner.gif)

    end

  end
end<commit_msg>Change how we load code: Need to extend ActiveRecord outside of initializer block. <commit_after>require 'filterrific/param_set'
require 'filterrific/action_view_extension'
require 'filterrific/active_record_extension'

module Filterrific
  class Engine < ::Rails::Engine

    # It's an engine so that we can add javascript and image assets
    # to the asset pipeline.

    isolate_namespace Filterrific

    ActiveSupport.on_load :active_record do
      extend Filterrific::ActiveRecordExtension
    end

    ActiveSupport.on_load :action_view do
      include Filterrific::ActionViewExtension
    end

    initializer "filterrific" do |app|
      app.config.assets.precompile += %w(filterrific-spinner.gif)
    end

  end
end
{'fraction_non_alphanumeric': 0.06405228758169934, 'fraction_numerical': 0.0, 'mean_word_length': 3.3868194842406876, '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': '7428556', 'n_tokens_mistral': 425, 'n_tokens_neox': 403, 'n_words': 118}