mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Ensure caching works in cache tests for API controllers
This commit is contained in:
@@ -11,8 +11,9 @@ module ApiActionCaching
|
||||
include ActionController::Caching::Actions
|
||||
include AbstractController::Layouts
|
||||
|
||||
# This config is not passed to the controller automatically with ActionController::Metal
|
||||
# These configs are not assigned to the controller automatically with ActionController::Metal
|
||||
self.cache_store = Rails.configuration.cache_store
|
||||
self.perform_caching = ActionController::Base.perform_caching
|
||||
|
||||
# ActionController::Caching asks for a controller's layout, but they're not used in the API
|
||||
layout false
|
||||
|
||||
Reference in New Issue
Block a user