This repository has been archived by the owner on Dec 31, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(framework): Fixed
envs_in_console
for rails
Up to this commit, `envs_in_console` was creating a `config/initializers/000_console.rb` file, which basically overloaded `Rails.application.load_console` method, with new ENVs. However, this caused problems, since console gets loaded pretty late in initialization stack. For example, if ENVs were used in `application/secrets.yml` (which is common practice) they wasn't loaded, since secrets is populated before loading the console. To avoid that, a new solution was implemented - `config/application.rb` is updated, with the ENVs (while still maintaining console context). This ensures, that all the variables are loaded as fast as possible, and visible to as many Rails components as they need to be. Signed-off-by: Igor Rzegocki <igor@rzegocki.pl>
- Loading branch information