DEV Community

Discussion on: Building and Consuming a JSON API with Rails and React

Collapse
 
nicktohzyu profile image
nicktohzyu • Edited

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)

Collapse
 
travisryte profile image
Thuya

This should be in the controllers folder.