-
Notifications
You must be signed in to change notification settings - Fork 895
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
Switch to Railtie, add config.paper_trail.enabled #695
Switch to Railtie, add config.paper_trail.enabled #695
Conversation
0898e6f
to
168572b
Compare
Would it be awkward to separate this into two PRs? Thanks. |
Also, the |
And it should be loaded in by the |
I am not familiar with the codebase, I just replaced it in the spot where active record was loaded before. |
Ok, I moved the code to their respective frameworks. |
@@ -34,9 +35,13 @@ def track_associations | |||
end | |||
alias_method :track_associations?, :track_associations | |||
|
|||
def disable! | |||
@disabled = true | |||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method, and the @disabled
ivar, seem unnecessary, given that we already have enabled=
.
There is another problem with the proposed As I stated in #635, we have already decided that the flag which enables PT should be thread-safe. It would be very confusing to have two flags controlling whether PT were enabled, and even more confusing if one is thread-safe and the other ( I'm going to continue exploring this PR, because I want to learn more about railties in hopes that will fix #635. As it stands, we can't merge this, but let me see what I can come up with. |
Unfortunately, simply removing the non-thread-safe |
In #635, we are discussing making the main flag "global" again (ie. moving it out of the RequestStore) |
Closing because this PR is continued by #717, which keeps @Hermanverschooten's idea and authorship (thank you!) but renames certain methods to clarify which are thread-safe and which are not. |
This PR does 2 things.