Closed gburgett closed 2 years ago
1 Warning | |
---|---|
:warning: | No issue referenced - please create an issue describing a single unit of work and reference it using "closes #[the issue number]" |
Generated by :no_entry_sign: Danger
@gibsorya please release a new patch version of wcc-contentful once you've confirmed that it works in paper-signs
Rails 6 introduced the Zeitwerk autoloader which uses a completely different technique to load application models. The technique no longer depends on
const_missing
and in fact that method no longer works when a rails application is in:zeitwerk
mode.Instead, Zeitwerk depends on ruby's core "autoload" feature. It sets up the relationship between constants and files beforehand, instead of discovering them on-demand. The consequence of this is that
const_get
still works to get the constants, but Ruby (not Zeitwerk) auto-loads it on demand from the file. To the application, the constant exists regardless of whether it has been loaded or not.More info: https://www.urbanautomaton.com/blog/2020/11/04/rails-autoloading-heaven/