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

Avoid using respond_to in application controller #41

Closed
AlexRevin opened this issue Oct 3, 2014 · 3 comments
Closed

Avoid using respond_to in application controller #41

AlexRevin opened this issue Oct 3, 2014 · 3 comments

Comments

@AlexRevin
Copy link

Hello

For API's using respond_to requires including the Mime parser, which is not needed most of the times.

Would suggest getting rid of this string:
respond_to :json
in
devise_token_auth / app / controllers / devise_token_auth / application_controller.rb

@lynndylanhurley
Copy link
Owner

Thanks, I'll look into this.

@nicolas-besnard
Copy link
Contributor

I'm not sure if it's the right think to do, but I usually do the respond_to :json in routes.rb with namespace :api, path: nil, defaults: { format: 'json' } do

@lynndylanhurley
Copy link
Owner

I think all the respond_to calls have been removed now. Let me know if you find any that I missed.

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

3 participants