<commit_before># Tolaria needs the latest and greatest copies of the models
# and admin settings at all times. This file is a bit of a hack
# so that we can trigger a code refresh whenever we need to.

module Tolaria

  def self.reload_app_folder!

    # KLUDGE: Reference the `Administrator` object so that Rails autoloads
    # it from the engine directory
    Administrator

    Dir["#{Rails.root}/app/models/*.rb", "#{Rails.root}/app/admin/*.rb"].each do |file|
      load file
    end

  end

end<commit_msg>Go through the "proper" Rails autoload system<commit_after>module Tolaria

  # To provide admin pane development magic, Tolaria provides this method
  # to force Rails to autoload/reload all model files.
  def self.reload_models!

    # Reference the `Administrator` object so that Rails autoloads
    # it from the engine directory
    Administrator

    # Reference each ActiveRecord::Base model so Rails
    # autoloads or reloads it.
    Dir["#{Rails.root}/app/models/*.rb"].each do |file|
      File.basename(file, ".rb").camelize.constantize
    end

  end

end
{'fraction_non_alphanumeric': 0.0824074074074074, 'fraction_numerical': 0.0, 'mean_word_length': 3.4122448979591837, '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': '4379412', 'n_tokens_mistral': 332, 'n_tokens_neox': 319, 'n_words': 124}