Skip to content

Commit

Permalink
cleanup serializerFor description
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Sep 24, 2019
1 parent d99d768 commit 61fedd6
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
another for serializing records via `Snapshot`s into the expected
server API format.
To implement a serializer, export a class implementing the
[MinimumSerializerInterface](MinimumSerializerInterface) from
the `app/serializers/` directory. An example is below.
To implement a serializer, export a class that conforms to the structure
described by the [MinimumSerializerInterface](MinimumSerializerInterface)
from the `app/serializers/` directory. An example is below.
```ts
import EmberObject from '@ember/object';
Expand All @@ -46,8 +46,9 @@
#### Serializer Resolution
The instances of serializers defined in `app/serializers/` can be looked up
via `store.serializerFor(name)`.
`store.serializerFor(name)` will lookup serializers defined in
`app/serializers` and return an instance. If no serializer is found, an
error will be thrown.
`serializerFor` first attempts to find a serializer with an exact match on `name`,
then falls back to checking for the presence of a serializer named `application`.
Expand Down

0 comments on commit 61fedd6

Please sign in to comment.