audited icon indicating copy to clipboard operation
audited copied to clipboard

Uninitialized Constant when defining an audit_class in the initializer

Open simmerz opened this issue 4 years ago • 0 comments

When defining a custom class in Rails 7, I get an Uninitialized constant error.

I believe this is because at the point of initialization, Zeitwerk hasn't been able to load the classes in.

Possible solution (others, such as Devise have done this) might be to refactor the config option to a string, and then constantize it when it's required in the code?

simmerz avatar Dec 24 '21 16:12 simmerz