Skip to content

Take advantage of ActionController::API

Compare
Choose a tag to compare
@alexcameron89 alexcameron89 released this 16 May 16:44

Api::ApiController will now inherit from ActionController::API which does not include many of the modules needed for browser support like CSRF protection, Flash, etc.

Because API's only respond with JSON, we can take advantage of ActionController::API and remove the need for stuff like respond_to blocks, skip :verify_authenticity_token or protect_from_forgery.