Skip to content

Commit 0606b06

Browse files
brendonrichmolj
authored andcommitted
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.
1 parent a77dfda commit 0606b06

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/howto/upgrade_from_0_8_to_0_10.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ ActiveModel::ArraySerializer.new(resources, root: "resources")
5757

5858
- No default serializer when serializer doesn't exist
5959
- `@options` changed to `instance_options`
60+
- 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
61+
- To emulate `0.8`'s walking of arbitrarily deep relationships use: `include: '**'`. E.g. `render json: @post, include: '**'`
6062

6163
## Steps to migrate
6264

0 commit comments

Comments
 (0)