<commit_before>require "loudmouth"
require "rails/routes"
require "extensions/helper"

module Loudmouth
  class Engine < Rails::Engine
    config.loudmouth = Loudmouth
    
    initializer "loudmouth.helpers" do
      Loudmouth.include_helpers()
    end
  end
  
  mattr_accessor :use_layout
  @@use_layout = ''
  
  mattr_accessor :new_comment_content
  @@new_comment_content = ''

  mattr_accessor :treasure_map
  @@treasure_map = {}

  def self.setup
    yield self
  end
  
  def self.include_helpers
    ActiveSupport.on_load(:action_controller) do
      include Loudmouth::Controllers::Helpers
    end

    # ActiveSupport.on_load(:action_view) do
    #   include Loudmouth::Controllers::Helpers
    # end
  end
end<commit_msg>Include helpers under :action_view Load ActiveRecord extensions.<commit_after>require "loudmouth"
require "rails/routes"
require "extensions/helper"
require "extensions/active_record"

module Loudmouth
  class Engine < Rails::Engine
    config.loudmouth = Loudmouth
    
    initializer "loudmouth.helpers" do
      Loudmouth.include_helpers()
    end
  end
  
  mattr_accessor :use_layout
  @@use_layout = ''
  
  mattr_accessor :new_comment_content
  @@new_comment_content = ''

  mattr_accessor :treasure_map
  @@treasure_map = {}

  def self.setup
    yield self
  end
  
  def self.include_helpers
    # ActiveSupport.on_load(:action_controller) do
    #   include Loudmouth::Controllers::Helpers
    # end

    ActiveSupport.on_load(:action_view) do
      include Loudmouth::Controllers::Helpers
    end
  end
end
{'fraction_non_alphanumeric': 0.0818298969072165, 'fraction_numerical': 0.0, 'mean_word_length': 3.7492354740061162, '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': '7343671', 'n_tokens_mistral': 513, 'n_tokens_neox': 512, 'n_words': 101}