0008-Change-autoload-mode-from-classic-to-zeitwerk.patch

Mizuki ISHIKAWA, 2021-10-19 08:50

Download (1.01 KB)

View differences:

config/application.rb
24 24
    # -- all .rb files in that directory are automatically loaded.
25 25

  
26 26
    # Custom directories with classes and modules you want to be autoloadable.
27
    config.autoload_paths += %W(#{config.root}/lib)
27
    config.autoloader = :zeitwerk
28
    config.autoload_paths += %W(#{config.root}/lib/autoloads)
29
    config.eager_load_paths += %W(#{config.root}/lib/autoloads)
28 30

  
29 31
    # Only load the plugins named here, in the order given (default is alphabetical).
30 32
    # :all can be used as a placeholder for all plugins not explicitly named.
31
-