File obs-server-2.10-0106-Enable-rails-6-defaults-and-keep-classic-code-loadin.patch of Package obs-server

From 6c542fa32abdf6fd60c963328d1c668d607c951a Mon Sep 17 00:00:00 2001
From: Lukas Krause <lkrause@suse.de>
Date: Mon, 10 Feb 2020 13:53:26 +0100
Subject: [PATCH] Enable rails 6 defaults and keep classic code loading
 mechanism

Keep the classic code loading mechanism for now, since
the usuage of zeitwerk need a lot of restructuring
regarding the naming of classes etc.
This should be tackled as soon as the upgrade to Rails 6 was
successfully.
---
 src/api/config/application.rb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/api/config/application.rb b/src/api/config/application.rb
index ce7547a6c3..084a2811fd 100644
--- a/src/api/config/application.rb
+++ b/src/api/config/application.rb
@@ -20,6 +20,11 @@ module OBSApi
     # Application configuration should go into files in config/initializers
     # -- all .rb files in that directory are automatically loaded.
 
+    # Enable rails version 6.0 defaults
+    config.load_defaults(6.0)
+    # For now, use the classic/oldway for code loading in rails instead of zeitwerk
+    config.autoloader = :classic
+
     # Custom directories with classes and modules you want to be autoloadable.
     # config.autoload_paths += %W(#{config.root}/extras)
     config.eager_load_paths << Rails.root.join('lib', 'backend')
-- 
2.31.1