ApplicationController
RB-RL1005ApplicationController
. 1# frozen_string_literal: true
2
3module Api
4 class BaseController < ActionController::Base 5 protect_from_forgery with: :exception, unless: -> { request.format.json? }
6
7 before_action :verify_requested_format!
ActionController::Base
should only be used to subclass ApplicationController
. All other controllers should subclass from ApplicationController
.
class MyController < ActionController::Base
# ...
end
class MyController < ApplicationController
# ...
end