Class: Config::Integrations::Rails::Railtie

Inherits:
Rails::Railtie
  • Object
show all
Defined in:
lib/config/integrations/rails/railtie.rb

Instance Method Summary collapse

Instance Method Details

#preloadObject



5
6
7
8
9
10
11
12
13
14
# File 'lib/config/integrations/rails/railtie.rb', line 5

def preload
  # Manually load the custom initializer before everything else
  initializer = ::Rails.root.join('config', 'initializers', 'config.rb')
  require initializer if File.exist?(initializer)

  # Parse the settings before any of the initializers
  Config.load_and_set_settings(
    Config.setting_files(::Rails.root.join('config'), ::Rails.env)
  )
end