Skip to content

Commit

Permalink
Document namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
bf4 committed May 1, 2017
1 parent 96028a7 commit ec7b585
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/general/serializers.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Where:
- `type:` the resource type as used by JSON:API, especially on a `belongs_to` relationship.
- `class_name:` used to determine `type` when `type` not given
- `foreign_key:` used by JSON:API on a `belongs_to` relationship to avoid unnecessarily loading the association object.
- `namespace:` used when looking up the serializer and `serializer` is not given. Falls back to the parent serializer's `:namespace` instance options, which, when present, comes from the render options. See [Rendering#namespace](rendering.md#namespace] for more details.
- optional: `&block` is a context that returns the association's attributes.
- prevents `association_name` method from being called.
- return value of block is used as the association value.
Expand Down

0 comments on commit ec7b585

Please sign in to comment.