aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/6_0_release_notes.md1
-rw-r--r--guides/source/api_app.md9
2 files changed, 10 insertions, 0 deletions
diff --git a/guides/source/6_0_release_notes.md b/guides/source/6_0_release_notes.md
index 8c9f55fc85..180cfa371c 100644
--- a/guides/source/6_0_release_notes.md
+++ b/guides/source/6_0_release_notes.md
@@ -454,6 +454,7 @@ Please refer to the [Changelog][active-storage] for detailed changes.
### Notable changes
* Updating an attached model via `update` or `update!` ala `@user.update!(images: [ … ])` now replaces the existing images instead of merely adding to them.
+ ([Pull Request](https://github.com/rails/rails/pull/33303))
Active Model
------------
diff --git a/guides/source/api_app.md b/guides/source/api_app.md
index b8b6cb7874..181d39e7e0 100644
--- a/guides/source/api_app.md
+++ b/guides/source/api_app.md
@@ -420,6 +420,15 @@ Some common modules you might want to add:
- `ActionController::MimeResponds`: Support for `respond_to`.
- `ActionController::Cookies`: Support for `cookies`, which includes
support for signed and encrypted cookies. This requires the cookies middleware.
+- `ActionController::Caching`: Support view caching for the API controller. Please notice that
+ you will need to manually specify cache store inside the controller like:
+ ```ruby
+ class ApplicationController < ActionController::API
+ include ::ActionController::Caching
+ self.cache_store = :mem_cached_store
+ end
+ ```
+ Rails does *not* pass this configuration automatically.
The best place to add a module is in your `ApplicationController`, but you can
also add modules to individual controllers.