mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user