Skip to content

Commit 32b85a0

Browse files
committed
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`.
1 parent 27a5de2 commit 32b85a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/active_model_serializers/railtie.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Railtie < Rails::Railtie
2828
ActiveModelSerializers.config.perform_caching = Rails.configuration.action_controller.perform_caching
2929
# We want this hook to run after the config has been set, even if ActionController has already loaded.
3030
ActiveSupport.on_load(:action_controller) do
31-
ActiveModelSerializers.config.cache_store = cache_store
31+
ActiveModelSerializers.config.cache_store = ActionController::Base.cache_store
3232
end
3333
end
3434

0 commit comments

Comments
 (0)