-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Update the relationship docs to remove some references to a globals s… #4518
Conversation
@@ -171,7 +171,7 @@ export const RelationshipsClassMethodsMixin = Ember.Mixin.create({ | |||
}); | |||
``` | |||
|
|||
Calling `App.Post.typeForRelationship('comments')` will return `App.Comment`. | |||
Calling `postRecord.constructor.typeForRelationship('comments')` will return `Comment`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I recall correctly, @fivetanley had some thoughts of not advertising constructor
publicly? Just want to double check...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, also it looks like typeForRelationship
needs the store
to be passed as 2nd argument...
a75a7ea
to
9f1d6b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the missing @param {DS.Store} store
argument to the inverseFor
doc, while you're at it?
Thanks!
@@ -171,7 +171,7 @@ export const RelationshipsClassMethodsMixin = Ember.Mixin.create({ | |||
}); | |||
``` | |||
|
|||
Calling `App.Post.typeForRelationship('comments')` will return `App.Comment`. | |||
Calling `postRecord.constructor.typeForRelationship('comments', store)` will return `Comment`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetanley if I recall correctly you had some thoughts on not advertising the use of constructor
?
@bmac what do you think of using store.modelFor("post").typeForRelationship("comments")
instead?
9f1d6b1
to
2a66b5c
Compare
2a66b5c
to
65006cc
Compare
Done @pangratz. |
…tyle namespace