I'm not 100% if my Rails app will always just be an API.
With that in mind, I have keep ActionController:
class ApplicationController < ActionController::Base
and opted to create an api controller,
class ApiController < ActionController::API
.
Now, I have not changed my application.rb
, so I do have any configuration pertaining to config.api_only
.
That being said, I do know that if I to solely build an API, it could be 40% faster through rails-api
because it cuts down on the middleware in the stack. Do I still hold this benefit by just inheriting from ActionController::API
? If I don't have this 40% boost, are there any benefits to doing this then?