Add ActionController::ConditionalGet to Api::BaseController

This was added in Spree around the time of Rails 4.2 and seems to fix some of the response errors around the `responders` gem.
This commit is contained in:
Matt-Yorkley
2020-11-12 23:19:32 +00:00
parent 60aaf8100a
commit c6c20dc0f6

View File

@@ -1,7 +1,6 @@
# Base controller for OFN's API
require_dependency 'spree/api/controller_setup'
require "spree/core/controller_helpers/ssl"
require "application_responder"
module Api
class BaseController < ActionController::Metal
@@ -10,9 +9,7 @@ module Api
include Spree::Api::ControllerSetup
include Spree::Core::ControllerHelpers::SSL
include ::ActionController::Head
self.responder = ApplicationResponder
respond_to :json
include ::ActionController::ConditionalGet
attr_accessor :current_api_user