-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 `valid_token?' for nil:NilClass) #1035
Comments
Hi @blaslaunchlabs please elaborate on the issue you're facing exactly? |
Hi, I'm trying to use @resource.valid_token?(token, client_id) but i get a NoMethodError (undefined method valid_token? for nil:NilClass). am I doing wrong or this valid token is not working? |
@blaslaunchlabs I think you need in your controller find a user firstly. As I realized valid_token? is object method and @ resource object is nil. Try something like this in your controller:
|
Thanks @dks17 its working that way. |
Yay! Thanks @dks17 for the assist |
Hi I'm trying to use
@resource.valid_token?(token, client_id)
but i get aNoMethodError (undefined method valid_token? for nil:NilClass)
below is my code. Am I doing wrong or this valid token is not working?The text was updated successfully, but these errors were encountered: