Skip to content
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

Correct handling namespaced resources #355

Merged
merged 1 commit into from
Aug 25, 2015

Conversation

yivo
Copy link

@yivo yivo commented Aug 25, 2015

Fixes issue #348.
Recipe to reproduce bug:
Add route:

    mount_devise_token_auth_for 'Project::ACL::User', at: 'api/auth'

Sign in and then try to validate token.
You will get:

Processing by DeviseTokenAuth::TokenValidationsController#validate_token as */*
Completed 500 Internal Server Error in 3ms (ActiveRecord: 0.0ms)

NoMethodError (undefined method `name' for nil:NilClass):
  devise (3.5.1) app/controllers/devise_controller.rb:38:in `resource_name'
  devise_token_auth (0.1.34) app/controllers/devise_token_auth/application_controller.rb:10:in `resource_class'
  devise_token_auth (0.1.34) app/controllers/devise_token_auth/concerns/set_user_by_token.rb:19:in `set_user_by_token'

@yivo yivo mentioned this pull request Aug 25, 2015
booleanbetrayal added a commit that referenced this pull request Aug 25, 2015
Correct handling namespaced resources
@booleanbetrayal booleanbetrayal merged commit ce51aa3 into lynndylanhurley:master Aug 25, 2015
@booleanbetrayal
Copy link
Collaborator

Thanks for this @yivo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants