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

Update README to include example scenarios, #25 #26

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rmharrison
Copy link
Contributor

There is no silver bullet when it comes to passing application data to urlSegment
The README should reflect this fact.

There is no silver bullet when it comes to passing application data to `urlSegment`
The README should reflect this fact.
@amiel
Copy link
Owner

amiel commented Oct 31, 2016

@rmharrison I just wanted to let you know that I haven't forgotten this. I'm having a particularly busy week :/

@rmharrison
Copy link
Contributor Author

@amiel: Fair play. It's a larger change than we discussed. Back-and-forth is expected.

@amiel
Copy link
Owner

amiel commented Nov 20, 2016

@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;;
Copy link
Owner

Choose a reason for hiding this comment

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

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.

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.

None yet

2 participants