From ac5906c2a77363f65167daad27f35792a7fe5b8b Mon Sep 17 00:00:00 2001 From: Joe Rafaniello Date: Mon, 8 May 2023 17:06:35 -0400 Subject: [PATCH] [WIP] Switch autoloader to zeitwerk Add note about rails 6.1 defaults: Disable defaults as ActiveRecord::Base.belongs_to_required_by_default = true causes MiqRegion.seed to fail validation on belongs_to :maintenacne zone. --- config/application.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/application.rb b/config/application.rb index f5eff43991a..f29aca46797 100644 --- a/config/application.rb +++ b/config/application.rb @@ -96,6 +96,10 @@ class Application < Rails::Application config.autoload_paths += config.eager_load_paths + config.autoloader = :zeitwerk + # config.load_defaults 6.1 + # Disable defaults as ActiveRecord::Base.belongs_to_required_by_default = true causes MiqRegion.seed to fail validation on belongs_to :maintenacne zone + # NOTE: If you are going to make changes to autoload_paths, please make # sure they are all strings. Rails will push these paths into the # $LOAD_PATH.