method

config_for

Importance_1
v5.1.7 - Show latest stable - 0 notes - Class: Rails::Application
config_for(name, env: Rails.env) public

Convenience for loading config/foo.yml for the current Rails env.

Example:

# config/exception_notification.yml:
production:
  url: http://127.0.0.1:8080
  namespace: my_app_production
development:
  url: http://localhost:3001
  namespace: my_app_development

# config/environments/production.rb
Rails.application.configure do
  config.middleware.use ExceptionNotifier, config_for(:exception_notification)
end
Show source
Register or log in to add new notes.