You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The change made in 53b0060 doesn’t actually work in environments with autoloading when there is no ::Collection; the .safe_constantize creates a recursive loop which just tries to load the same file again.
We got around this by just doing Object.const_set(:Collection, Hyrax.config.collection_class) in an initializer, but this isn’t ideal.
The text was updated successfully, but these errors were encountered:
If you need :Collection to be nil in an initializer (for example, so that Valkyrie.config.resource_class_resolver can define it), the following worked for me :—
Digging a little more into this… this only happens when ::Collection is referenced in an initializer (outside of e·g a to_prepare). If Rails manages to complete initialization, then the implemented solution seems to work.
The change made in 53b0060 doesn’t actually work in environments with autoloading when there is no
::Collection
; the.safe_constantize
creates a recursive loop which just tries to load the same file again.We got around this by just doing
Object.const_set(:Collection, Hyrax.config.collection_class)
in an initializer, but this isn’t ideal.The text was updated successfully, but these errors were encountered: