We're going to create the ApiController, to extend the controller from the ActionController::API module of Rails, and also we're going to include the JSONAPI::ActsAsResourceController from JSONAPI::Resources.
class ApiController < ActionController::API
include JSONAPI::ActsAsResourceController
end
Which file does this go in, and what is the path to that file? (am total beginner)
You wrote
We're going to create the ApiController, to extend the controller from the ActionController::API module of Rails, and also we're going to include the JSONAPI::ActsAsResourceController from JSONAPI::Resources.
class ApiController < ActionController::API
include JSONAPI::ActsAsResourceController
end
Which file does this go in, and what is the path to that file? (am total beginner)
This should be in the controllers folder.