I\'m trying to write an Ember application in Rails 4, and have decided to go with rails-api
for the api controllers, while keeping the application controller in
If you're like me and creating an API on top of an existing application, you can add this to your config/application.rb file:
config.api_only = false
Not sure but maybe you need to include the ActionDispatch::Flash
middleware to support the flash. Using:
config.middleware.use ActionDispatch::Flash
The docs says:
ActionDispatch::Flash: Supports the flash mechanism in ActionController.
I hope it helps
See: https://github.com/plataformatec/devise/issues/2775
Inside devise.rb change
config.navigational_formats = ['*/*', :html]
to:
config.navigational_formats = [:json]
or just [ ]