File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 8
8
9
9
Supported Rails versions: >= 4.1
10
10
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
+
11
40
### Upgrading to 0.10
12
41
13
42
` sideload_whitelist ` has been moved from the resource to the controller:
You can’t perform that action at this time.
0 commit comments