Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add examples to the Serializer API docs #4440

Merged
merged 1 commit into from
Oct 21, 2016

Conversation

bmac
Copy link
Member

@bmac bmac commented Jun 22, 2016

No description provided.

It's injected as a service.
It can be used to push records from a non flat data structure server
response.
The `store` property is the application's `store` that contains
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so it's a bit confusing here because you have the store passed into the function's parameter list, and also this.store, which gets set when the serializer is instantiated.

I think this documentation is for this.store because of @property, but isn't used in the example below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call.

},
});
```

@method serialize
@param {DS.Model} record
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update this to be DS.Snapshot?

@pangratz
Copy link
Member

Nice writeup! 💯 👍

@bmac
Copy link
Member Author

bmac commented Oct 21, 2016

@pangratz @fivetanley This pr has been updated.

Copy link
Contributor

@wecc wecc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than a couple of minor things

It can be used to push records from a non flat data structure server
response.
The `store` property is the application's `store` that contains
all records. It can be used to look up serializer for other model
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extreme Nitpicking™️ – double space here :)

Also look up serializer for other model type => look up serializers for other model types ?

@method serialize
@param {DS.Model} record
@param {DS.Snapshot} record
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this parameter be named snapshot instead of record?

@pangratz pangratz merged commit 1b923ad into emberjs:master Oct 21, 2016
@pangratz
Copy link
Member

Sorry @wecc, GitHub didn't show up your comment when I was merging. Wanna open up a follow up PR?

@wecc
Copy link
Contributor

wecc commented Oct 21, 2016

Planck time trolled us! 🕐

#4614

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants