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

API Does Not Use Api_Controller #887

Closed
iamameme opened this issue May 12, 2017 · 7 comments
Closed

API Does Not Use Api_Controller #887

iamameme opened this issue May 12, 2017 · 7 comments

Comments

@iamameme
Copy link

iamameme commented May 12, 2017

Sorry, but I couldn't find a solution to this anywhere. In the documentation, it says that if you are using both devise and devise_token_auth, you need two different controllers.

# app/controllers/api_controller.rb
# API routes extend from this controller
class ApiController < ActionController::Base
  include DeviseTokenAuth::Concerns::SetUserByToken
end

# app/controllers/application_controller.rb
# leave this for ActiveAdmin, and any other non-api routes
class ApplicationController < ActionController::Base
end

I did this, but the API calls still go to the normal application controller and don't ever reach the API controller. How do you connect them?

@zachfeldman
Copy link
Contributor

Hi there @iamameme ,

In an effort to cleanup this project and prioritize a bit, we're marking issues that haven't had any activity in a while with a "close-in-7-days" label. If we don't hear from you in about a week, we'll be closing this issue. Obviously feel free to re-open it at any time if it's the right time or this was done in error!

If you are still having the issue (especially if it's a bug report) please refer to our new Issue Template to provide some more details to help us solve it.

Hope all is well.

@RigoOnRails
Copy link

+1

@zachfeldman
Copy link
Contributor

@RigoTheCEO would you prefer we keep this issue open?

@RigoOnRails
Copy link

Yes. We should be able to decide which application class this gem descends from. This could be helpful in many ways, especially when using the standard Devise gem with this one.

@zachfeldman
Copy link
Contributor

Awesome! @RigoTheCEO can you submit a pull request to that effect if you feel this way? I'd be glad to review.

@karlingen
Copy link
Contributor

@zachfeldman PR up for grabs!

@karlingen
Copy link
Contributor

@iamameme see if the latest master fixes your issue

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

No branches or pull requests

5 participants