I\'m using Devise on my application and would like to create a global API key that can access JSON data of anyone\'s account without having to log-in.
For example, s
One option no one has mentioned is to have a completely separate set of controllers for the API that do not inherit from ApplicationController
.
I have seen the pattern used where API controllers live in files such as /app/controllers/api/v1/somethings.rb
and are accessible via routes such as /api/v1/somethings
. Each of the specific API controllers inherits from a base API controller that inherits from ActionController::Base
, so does not include any of the filters defined on ApplicationController
.