-
Notifications
You must be signed in to change notification settings - Fork 161
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
NoMethodError: undefined method `to_key' for :user:Symbol #29
Comments
Hey @redox - I've had this test fail for a while, although, I couldn't figure out why. Unsure if it's session teardown issues with Capybara, or, the test rails app in /test/rails_app isn't built properly. I've been meaning to address this for a while, just, time-poor at the moment. |
Actually, I got it twice in production as well :/ |
This happens to me in production when I try to hit users/displayqr while being logged out. I'll see if I can submit a patch quickly |
I've fixed the tests, but, this issue still persists. I'll pull this in |
I've pulled in those changes @felipecsl - into 1070d62 |
I still see different errors depending on the state of the session - so I'm not going to close this entirely yet. |
I ran into the same problem and did some investigation. My understanding was that the intention of the following code was to ensure that if a non authenticated user call any of the actions, he would be redirected by Devise/warden to the login page: class Devise::DisplayqrController < DeviseController
prepend_before_filter :authenticate_scope!, :only => [:show,:update, :refresh]
...
def authenticate_scope!
send(:"authenticate_#{resource_name}!")
self.resource = send("current_#{resource_name}")
end
end Unfortunately, the Devise code for def authenticate_#{resource_name}!(favourite=nil, opts={})
...
opts[:scope] = mapping
warden.authenticate!(opts) if !devise_controller? || opts.delete(:force)
...
end
def devise_controller?
is_a?(::DeviseController)
end Since the class Devise::DisplayqrController < DeviseController
...
def authenticate_scope!
send(:"authenticate_#{resource_name}!", force: true)
self.resource = send("current_#{resource_name}")
end
end |
Is there any update on this? 👀 |
I've got that one when tried to |
While running the tests I got this error. Any chance you understand it? (devise=3.2.4 in my Gemfile.lock)
The text was updated successfully, but these errors were encountered: