Update README to include example scenarios, #25#26
Conversation
There is no silver bullet when it comes to passing application data to `urlSegment` The README should reflect this fact.
|
@rmharrison I just wanted to let you know that I haven't forgotten this. I'm having a particularly busy week :/ |
|
@amiel: Fair play. It's a larger change than we discussed. Back-and-forth is expected. |
|
@rmharrison apologies for not getting back to you sooner. I'm now in the middle of paternity leave, so I may not be very responsive. I was planning to give more detailed feedback, but for now, here are a few thoughts. I like the content that you've added and I think it needs some organization and simplification. Right now it's a large list of really useful information. However, I would like to the README to be something people can scan through quickly to decide if ember-data-url-templates is a good fit for their project. My original reaction was that none of this should be in the README (it should all be in the wiki). I think you're right though; since there's no silver bullet, it should be clear by glancing at the README that that's the case. Do you think it would work to still have just a SYNOPSIS with just one or two examples (maybe one example can cover multiple cases), and start a new section of the wiki with some of these details? Thanks so much for working on this! |
|
|
||
| urlSegments: { | ||
| userId(type, id, snapshot, query) { | ||
| return snapshot.belongsTo('user').id;; |
There was a problem hiding this comment.
This should be
return snapshot.belongsTo('user', { id: true });This way, you can use a relationship's id without the relationship model having been loaded.
There is no silver bullet when it comes to passing application data to
urlSegmentThe README should reflect this fact.