Update upgrade_from_0_8_to_0_10.md (#1933)

Update upgrade_from_0_8_to_0_10.md

Changes the upgrade guide to highlight the change in the way relationships are walked.
This commit is contained in:
Brendon Muir 2016-09-21 05:38:53 +12:00 committed by Lee Richmond
parent a77dfdaa85
commit 0606b06abd

View File

@ -57,6 +57,8 @@ ActiveModel::ArraySerializer.new(resources, root: "resources")
- No default serializer when serializer doesn't exist
- `@options` changed to `instance_options`
- Nested relationships are no longer walked by default. Use the `:include` option at **controller `render`** level to specify what relationships to walk. E.g. `render json: @post, include: {comments: :author}` if you want the `author` relationship walked, otherwise the json would only include the post with comments. See: https://github.com/rails-api/active_model_serializers/pull/1127
- To emulate `0.8`'s walking of arbitrarily deep relationships use: `include: '**'`. E.g. `render json: @post, include: '**'`
## Steps to migrate