Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update rendering.md #1799

Merged
merged 1 commit into from
Aug 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Misc:

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

- [#1799](https://github.com/rails-api/active_model_serializers/pull/1799) Add documentation for setting the adapter. (@ScottKbka)

### [v0.10.2 (2016-07-05)](https://github.com/rails-api/active_model_serializers/compare/v0.10.1...v0.10.2)

Fixes:
Expand Down
6 changes: 5 additions & 1 deletion docs/general/rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ See [Fields](fields.md) for more information.

#### adapter

PR please :)
This option lets you explicitly set the adapter to be used by passing a registered adapter. Your options are `:attributes`, `:json`, and `:json_api`.

```
ActiveModel::Serializer.config.adapter = :json_api
```

#### key_transform

Expand Down
2 changes: 1 addition & 1 deletion lib/active_model/serializer/association.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module ActiveModel
class Serializer
# This class hold all information about serializer's association.
# This class holds all information about serializer's association.
#
# @attr [Symbol] name
# @attr [ActiveModel::Serializer] serializer
Expand Down