Move misplaced conditional

This commit is contained in:
Xavier Noria 2022-04-13 15:58:36 +02:00
parent a0eaaae0d5
commit 9fb131cb39
1 changed files with 4 additions and 4 deletions

View File

@ -73,11 +73,11 @@ module Rails
ActiveSupport.run_load_hooks(:before_eager_load, self)
Zeitwerk::Loader.eager_load_all
config.eager_load_namespaces.each(&:eager_load!)
end
unless config.cache_classes
app.reloader.after_class_unload do
Rails.autoloaders.main.eager_load
unless config.cache_classes
app.reloader.after_class_unload do
Rails.autoloaders.main.eager_load
end
end
end
end