Please sign in to comment.
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 <firstname.lastname@example.org>
- Loading branch information...
Showing with 12 additions and 7 deletions.