From c6c20dc0f69413b24079fef1ea430039b33d58da Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Thu, 12 Nov 2020 23:19:32 +0000 Subject: [PATCH] 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. --- app/controllers/api/base_controller.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/controllers/api/base_controller.rb b/app/controllers/api/base_controller.rb index 540c7b1fea..493b13665e 100644 --- a/app/controllers/api/base_controller.rb +++ b/app/controllers/api/base_controller.rb @@ -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