Sha256: 8ff7532ae7814f91806f9632e305d4649a4b0d7f4d73f51a7a8d7b92388291c4
Contents?: true
Size: 821 Bytes
Versions: 30
Compression:
Stored size: 821 Bytes
Contents
# frozen_string_literal: true module Anyway # :nodoc: DEFAULT_CONFIGS_PATH = "config/configs" class Railtie < ::Rails::Railtie # :nodoc: # Add settings to Rails config config.anyway_config = Anyway::Settings config.before_configuration do next if ::Rails.application.initialized? config.anyway_config.autoload_static_config_path = DEFAULT_CONFIGS_PATH end config.before_eager_load do Anyway::Settings.autoloader&.eager_load end # Remove `autoload_static_config_path` from Rails `autoload_paths` # since we use our own autoloading mechanism initializer "anyway_config.cleanup_autoload" do Anyway::Settings.cleanup_autoload_paths end # Make sure loaders are not changed in runtime config.after_initialize { Anyway.loaders.freeze } end end
Version data entries
30 entries across 30 versions & 2 rubygems