Skip to content

Commit

Permalink
Update autoload configuration
Browse files Browse the repository at this point in the history
Move ignored lib directories into the `autoload_lib` config.
  • Loading branch information
gbp committed Jan 13, 2025
1 parent 7390bd4 commit c5dee05
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
13 changes: 12 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,18 @@ class Application < Rails::Application
# Please, add to the `ignore` list any other `lib` subdirectories that do
# not contain `.rb` files, or that should not be reloaded or eager loaded.
# Common ones are `templates`, `generators`, or `middleware`, for example.
config.autoload_lib(ignore: %w(assets tasks))
config.autoload_lib(
ignore: %w(
acts_as_xapian
assets
core_ext
custom_cops
generators
has_tag_string
tasks
themes
)
)

# Configuration for the application, engines, and railties goes here.
#
Expand Down
6 changes: 0 additions & 6 deletions config/initializers/zeitwerk.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,8 @@
)

Rails.autoloaders.main.ignore(
"lib/acts_as_xapian",
"lib/confidence_intervals.rb",
"lib/configuration.rb",
"lib/core_ext",
"lib/custom_cops",
"lib/generators",
"lib/has_tag_string",
"lib/i18n_fixes.rb",
"lib/languages.rb",
"lib/mail_handler/backends/mail_extensions.rb",
Expand All @@ -25,6 +20,5 @@
"lib/routing_filters.rb",
"lib/stripe_mock_patch.rb",
"lib/theme.rb",
"lib/themes",
"lib/use_spans_for_errors.rb"
)

0 comments on commit c5dee05

Please sign in to comment.