-
Notifications
You must be signed in to change notification settings - Fork 902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't set enabled to false in initializer (rails) #1038
Comments
Hi Patryk.
Per the docs, that should go in
If that is your goal, try |
Hi Patryk, I hope my comments helped. I haven't heard back so I'm going to close this, but please let me know if you find behavior that doesn't match the documentation. |
Thankful to find this thread after debugging the same "issue". It's worth noting that some documentation does include the
I'll open a PR that clarifies the readme for this case. |
I tried to have logging turned on only for specific endpoints in all environments. If you set enabled to false in the initializer it will not work.
In
config/initializers/paper_trail.rb
PaperTrail.config.enabled = false
Then
rails console
After some digging, I found that engine overrides it to true when environment config is missing.
In
PaperTrail::Rails::Engine
It probably should use
PaperTrail.enabled?
instead oftrue
, or even not setenabled
when config value is missing.The text was updated successfully, but these errors were encountered: