Skip to content

Commit 7178b9d

Browse files
author
Scott Kobewka
committed
Documenting Adapter. Fixing typo in association.rb documentation.
1 parent 455068d commit 7178b9d

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Misc:
1919

2020
- [#1878](https://github.com/rails-api/active_model_serializers/pull/1878) Cache key generation for serializers now uses `ActiveSupport::Cache.expand_cache_key` instead of `Array#join` by default and is also overridable. This change should be backward-compatible. (@markiz)
2121

22+
- [#1799](https://github.com/rails-api/active_model_serializers/pull/1799) Add documentation for setting the adapter. (@ScottKbka)
23+
2224
### [v0.10.2 (2016-07-05)](https://github.com/rails-api/active_model_serializers/compare/v0.10.1...v0.10.2)
2325

2426
Fixes:

docs/general/rendering.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ See [Fields](fields.md) for more information.
8282

8383
#### adapter
8484

85-
PR please :)
85+
This option lets you explicitly set the adapter to be used by passing a registered adapter. Your options are `:attributes`, `:json`, and `:json_api`.
86+
87+
```
88+
ActiveModel::Serializer.config.adapter = :json_api
89+
```
8690

8791
#### key_transform
8892

lib/active_model/serializer/association.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module ActiveModel
22
class Serializer
3-
# This class hold all information about serializer's association.
3+
# This class holds all information about serializer's association.
44
#
55
# @attr [Symbol] name
66
# @attr [ActiveModel::Serializer] serializer

0 commit comments

Comments
 (0)