Skip to content

Commit f2755d6

Browse files
committed
Merge pull request #1637 from ncuesta/patch-1
[FIX] Make cache_store reference explicit
2 parents 27a5de2 + ced45d5 commit f2755d6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Breaking changes:
44

55
Features:
6+
- [#1637](https://github.com/rails-api/active_model_serializers/pull/1637) Make references to 'ActionController::Base.cache_store' explicit
7+
in order to avoid issues when application controllers inherit from 'ActionController::API'. (@ncuesta)
68
- [#1633](https://github.com/rails-api/active_model_serializers/pull/1633) Yield 'serializer' to serializer association blocks. (@bf4)
79
- [#1616](https://github.com/rails-api/active_model_serializers/pull/1616) SerializableResource handles no serializer like controller. (@bf4)
810
- [#1618](https://github.com/rails-api/active_model_serializers/issues/1618) Get collection root key for

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)