-
I am upgrading my app to Rails 7.1, and I am having Zeitweik complaining about a custom feature not defining an expected class:
The file is defining a standard feature: module Rodauth
Feature.define(:verify_account_forever_grace, :VerifyAccountForeverGrace) do
…
end
end I read https://github.com/janko/rodauth-rails/wiki/Custom-Extensions but I am not sure how this can work for non-trivial features? For example one of ours calls I have not been able to find documentation on how to create complex features without using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I'm assuming you're getting this error with the new Because it's not in I will add these instructions to the wiki page. |
Beta Was this translation helpful? Give feedback.
I'm assuming you're getting this error with the new
config.autoload_lib
setting. The way to make Zeitwerk happy is move the feature tolib/rodauth/verify_account_forever_grace.rb
. This satisfies Zeitwerk's file naming requirements, because Rodauth internally defines aRodauth::VerifyAccountForeverGrace
module.Because it's not in
rodauth/features/*
directory that Rodauth will automatically require from, you just need to manuallyrequire "rodauth/verify_account_forever_grace"
before enabling the feature. But I'm assuming you're already doing that 🙂 It seems that code reloading for this file still works even if you manually require it.I will add these instructions to the wiki page.