mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Make cache_store reference explicit
This avoids an issue when the base class for application's controllers inherit from `ActionController::API` instead of `ActionController::Base`.
This commit is contained in:
parent
27a5de262f
commit
32b85a0aae
@ -28,7 +28,7 @@ module ActiveModelSerializers
|
||||
ActiveModelSerializers.config.perform_caching = Rails.configuration.action_controller.perform_caching
|
||||
# We want this hook to run after the config has been set, even if ActionController has already loaded.
|
||||
ActiveSupport.on_load(:action_controller) do
|
||||
ActiveModelSerializers.config.cache_store = cache_store
|
||||
ActiveModelSerializers.config.cache_store = ActionController::Base.cache_store
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user