Skip to content

Commit d34069b

Browse files
authored
Merge pull request #1799 from ScottKbka/patch-1
Update rendering.md
2 parents 9aaaa73 + 7178b9d commit d34069b

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
@@ -25,6 +25,8 @@ Misc:
2525

2626
- [#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)
2727

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

3032
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 [Hash{Symbol => Object}] options

0 commit comments

Comments
 (0)