headwayio / voyage

A Rails template with our standard defaults, ready to deploy to Heroku. **See readme in: lib/voyage/README.md**
https://headway.io/voyage
MIT License
0 stars 1 forks source link

Include base and user API controllers #6

Closed noahsettersten closed 7 years ago

noahsettersten commented 7 years ago

This backports the basic API setup being used for the beginnings of Hypremium. I've moved the API-specific overrides into the BaseApiController now, so no changes should be necessary to ApplicationController.

Something we may want to consider: should we version the base controller for the API as well (i.e. Api::V1::BaseApiController, Api::V2::BaseApiController)? Right now if any logic changes within the core base controller it will effect all versions of the API's endpoints. This is nice for making bug fixes across the board, but we have to be careful to only make behavior-dependent changes in the actual API controller subclasses.