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

Cannot send confirmation email if there is no 'User' model #68

Closed
ybian opened this issue Nov 7, 2014 · 2 comments
Closed

Cannot send confirmation email if there is no 'User' model #68

ybian opened this issue Nov 7, 2014 · 2 comments

Comments

@ybian
Copy link

ybian commented Nov 7, 2014

TestCase:

  1. Setup ng-token-auth and devise_token_auth_demo properly and make it work correctly;
  2. Change the model name User to Developer and change routes.rb accordingly to:
    mount_devise_token_auth_for 'Developer', at: '/auth'
  3. Test again with registration.

Expected Result:

Should send out confirmation email successfully

Actual Result:

Got the following exception:

ameError (uninitialized constant DeviseTokenAuth::RegistrationsController::User):
  /Users/ybian/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/bundler/gems/devise_token_auth-2d3595d405b7/app/controllers/devise_token_auth/registrations_controller.rb:24:in `create'

Seems that there is hard-coded reference to User in L24 of registrations_controller.rb:

        User.skip_callback("create", :after, :send_on_create_confirmation_instructions)
@lynndylanhurley
Copy link
Owner

Good catch! Thanks @ybian!

ybian added a commit to ybian/devise_token_auth that referenced this issue Nov 8, 2014
@lynndylanhurley
Copy link
Owner

The fix for this has been pushed into version 0.1.30.beta4. Please test to confirm.

m0to pushed a commit to m0to/devise_token_auth that referenced this issue Mar 19, 2015
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

No branches or pull requests

2 participants