-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Local variable used instead of calling the setter in devise_controller#require_no_authentication #5505
Comments
I may miss something, but I think this is intentional. This local variable is only used to determine
if no resource is authenticated, this code won't be executed and the instance variable will be nil (which is expected). |
@MatElGran
then second condition will get executed only if the first condition returns true, so |
@yasirazgar Appreciate your work on this. I think there's no need to set the value since we're redirecting just after that, would there be any value in setting the instance var to |
Pre-check
Environment
Current behavior
Uses
resource = warden.user(resource_name)
instead ofself.resource = warden.user(resource_name)
in devise_controller#require_no_authenticationdue to this instance variable
@user
is not populated, as the setterresource =
is not triggered.Expected behavior
Should use self.resource in devise_controller#require_no_authentication
so that the setter is triggered, and instance variable
@user
is populatedThe text was updated successfully, but these errors were encountered: