Skip to content

Commit c39a373

Browse files
author
Lee Richmond
committed
Update README
1 parent 9371d1d commit c39a373

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,35 @@
88

99
Supported Rails versions: >= 4.1
1010

11+
### Upgrading from 0.10.x to 0.11.x
12+
13+
Due to a backwards-incompatibility introduced in the underlying
14+
[jsonapi-rb](http://jsonapi-rb.org) gem, specifying custom serializers
15+
now works slightly differently.
16+
17+
Before:
18+
19+
```ruby
20+
# app/serializers/serializable_post.rb
21+
22+
has_many :comments, class: SerializableSpecialComment
23+
```
24+
25+
and/or
26+
27+
```ruby
28+
render_jsonapi(post, class: SerializableSpecialPost)
29+
```
30+
31+
This is now all handled at the controller level:
32+
33+
```ruby
34+
render_jsonapi(post, class: {
35+
Post: SerializableSpecialPost,
36+
Comment: SerializableSpecialComment
37+
})
38+
```
39+
1140
### Upgrading to 0.10
1241

1342
`sideload_whitelist` has been moved from the resource to the controller:

0 commit comments

Comments
 (0)