# Configuration in Rails app

Let’s not re-write a good article, go to: [https://joyofrails.com/articles/mastering-custom-configuration-in-rails](https://joyofrails.com/articles/mastering-custom-configuration-in-rails)

I mostly used `config.x` configuration that loads a yaml file with `config_for` that do the multi-environment by default:

```ruby
module YourApp
  class Application < Rails::Application
    config.x.external_service_xyz = config_for(:xyz_config) # loading the `xyz_config.yml` file
  end
end
```

This technique is also explained in the above article, check it out.
