From a47c84d584777238a6955e3a08436577c471af0f Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Fri, 15 Mar 2019 22:50:04 +0100 Subject: Engines are reloaded in Zeitwerk mode [closes #35618] --- activesupport/CHANGELOG.md | 4 ++++ activesupport/lib/active_support/dependencies/zeitwerk_integration.rb | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'activesupport') diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 2610cc63a4..b2330f2c9d 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,7 @@ +* In Zeitwerk mode, engines are now managed by the `main` autoloader. Engines may reference application constants, if the application is reloaded and we do not reload engines, they won't use the reloaded application code. + + *Xavier Noria* + * Add support for supplying `locale` to `transliterate` and `parameterize`. I18n.backend.store_translations(:de, i18n: { transliterate: { rule: { "ΓΌ" => "ue" } } }) diff --git a/activesupport/lib/active_support/dependencies/zeitwerk_integration.rb b/activesupport/lib/active_support/dependencies/zeitwerk_integration.rb index 1e697e1ba5..e00307d257 100644 --- a/activesupport/lib/active_support/dependencies/zeitwerk_integration.rb +++ b/activesupport/lib/active_support/dependencies/zeitwerk_integration.rb @@ -71,8 +71,7 @@ module ActiveSupport end def autoload_once?(autoload_path) - Dependencies.autoload_once_paths.include?(autoload_path) || - Gem.path.any? { |gem_path| autoload_path.to_s.start_with?(gem_path) } + Dependencies.autoload_once_paths.include?(autoload_path) end def freeze_autoload_paths -- cgit v1.2.3