<commit_before>require "rails/railtie"
require "subdomain_locale/url_for"
require "subdomain_locale/controller"

module SubdomainLocale
  class Railtie < ::Rails::Railtie

    initializer "subdomain_locale.url_helpers" do
      Rails.application.routes.url_helpers.send :include, SubdomainLocale::UrlFor
    end

    initializer "subdomain_locale.controller" do
      ActiveSupport.on_load :action_controller do
        include SubdomainLocale::Controller
      end
    end

  end
end<commit_msg>Move requires into the initialization hooks.<commit_after>require "rails/railtie"

module SubdomainLocale
  class Railtie < ::Rails::Railtie

    initializer "subdomain_locale.url_helpers" do
      require "subdomain_locale/url_for"
      Rails.application.routes.url_helpers.send :include, SubdomainLocale::UrlFor
    end

    initializer "subdomain_locale.controller" do
      ActiveSupport.on_load :action_controller do
        require "subdomain_locale/controller"
        include SubdomainLocale::Controller
      end
    end

  end
end
{'fraction_non_alphanumeric': 0.06846673095467695, 'fraction_numerical': 0.0, 'mean_word_length': 4.164179104477612, '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': '7225463', 'n_tokens_mistral': 306, 'n_tokens_neox': 297, 'n_words': 64}