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

Replace calls to store.find with store.findRecord #4039

Merged
merged 2 commits into from
Jan 6, 2016
Merged

Replace calls to store.find with store.findRecord #4039

merged 2 commits into from
Jan 6, 2016

Conversation

pangratz
Copy link
Member

@pangratz pangratz commented Jan 4, 2016

store.find has been deprecated in 1.13 and been officially removed in the 2.x series. This updates all references in the public documentation to use store.findRecord. Also some tests were still using store.find (which is still available since it is needed in the model() hook of Ember, but it is private now).

@@ -543,7 +543,7 @@ InternalModel.prototype = {
came back from the server, except the user obtained them out of band and is informing
the store of their existence. The most common use case is for supporting client side
nested URLs, such as `/posts/1/comments/2` so the user can do
`store.find('comment', 2, {post:1})` without having to fetch the post.
`store.findRecord('comment', 2, {post:1})` without having to fetch the post.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be store.findRecord('comment', 2, { preload: { post: 1 } })

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 catch! 👓

@wecc
Copy link
Contributor

wecc commented Jan 4, 2016

Nice @pangratz! Other than the comments above this LGTM

bmac added a commit that referenced this pull request Jan 6, 2016
Replace calls to store.find with store.findRecord
@bmac bmac merged commit bb36510 into emberjs:master Jan 6, 2016
@pangratz pangratz deleted the remove-calls-to-store-find branch January 6, 2016 16:34
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.

3 participants