Closed elia closed 1 year ago
Autoload paths are meant to list autoload roots and not the first level of the namespace.
E.g. having the following controller in lib/controllers/solidus_foo:
lib/controllers/solidus_foo/spree/my_controller.rb
The autoload will be triggered by a constant reference to Spree::MyController targeting spree/my_controller.rb inside lib/controllers/solidus_foo/. This means the autoload path needs to be lib/controllers/solidus_foo/.
Spree::MyController
spree/my_controller.rb
lib/controllers/solidus_foo/
See also https://edgeguides.rubyonrails.org/classic_to_zeitwerk_howto.html#globs-in-config-autoload-paths
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed:
@DanielePalombo @mamhoff can you confirm if fixes the issue for your projects?
Released in 0.9.3
Summary
Autoload paths are meant to list autoload roots and not the first level of the namespace.
E.g. having the following controller in lib/controllers/solidus_foo:
The autoload will be triggered by a constant reference to
Spree::MyController
targetingspree/my_controller.rb
insidelib/controllers/solidus_foo/
. This means the autoload path needs to belib/controllers/solidus_foo/
.See also https://edgeguides.rubyonrails.org/classic_to_zeitwerk_howto.html#globs-in-config-autoload-paths
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: