-
Notifications
You must be signed in to change notification settings - Fork 31
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
Userstamp trying to set stamper when connecting to dB if not called #25
Comments
Update - apparently it has NOTHING to do with the method being called as it crashes well before: Here are the routes:
And we can have an empty method in the health controller:
and it will still crash with the same error. |
Another update: Adding a current user method to the HealthController fixed the issue:
BUT this still doesnt explain why it was called in the first place. |
This is because ActiveRecord Userstamp sets the stamper for the lifetime of the request when flow of control is given to the controller. This is so that users do not have to explicitly set the stamper at the entry of every request. I would imagine most controllers would have the |
The behaviour is included in controller_additions.rb |
This is a weird one. We have a simple monitoring routine in a controller called
HealthController
Here is the method:
In our controller spec when we try to do a simple GET from the health controller, we get an error. Here is the spec:
And here is what we see:
Why would userstamp be involved at all in this?
The text was updated successfully, but these errors were encountered: