Merge pull request #1637 from ncuesta/patch-1

[FIX] Make cache_store reference explicit
This commit is contained in:
Benjamin Fleischer 2016-03-31 08:28:11 -05:00
commit f2755d6eb8
2 changed files with 3 additions and 1 deletions

View File

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

View File

@ -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