Skip to content

Commit c6716d6

Browse files
committed
Add note about rails generators.
1 parent 9752c55 commit c6716d6

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

source/guides/serialization/defining.html.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,14 @@ end
242242
Note: it is also possible to manually override the linkage data for a
243243
relationship (which can be useful to add linkage-level meta information) via the
244244
`linkage` DSL method.
245+
246+
## Rails generators
247+
248+
The jsonapi-rails gem comes with generators for serializable resource classes.
249+
It infers the attributes and relationships from your model definition.
250+
251+
Usage:
252+
```
253+
$ bundle exec rails generate jsonapi:serializable Post
254+
> created app/serializable/serializable_post.rb
255+
```

0 commit comments

Comments
 (0)