Skip to content

Update README to include example scenarios, #25#26

Open
rmharrison wants to merge 1 commit into
amiel:masterfrom
rmharrison:patch-1
Open

Update README to include example scenarios, #25#26
rmharrison wants to merge 1 commit into
amiel:masterfrom
rmharrison:patch-1

Conversation

@rmharrison

Copy link
Copy Markdown
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

amiel commented Oct 31, 2016

Copy link
Copy Markdown
Owner

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

@rmharrison

Copy link
Copy Markdown
Contributor Author

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

@amiel

amiel commented Nov 20, 2016

Copy link
Copy Markdown
Owner

@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!

Comment thread README.md

urlSegments: {
userId(type, id, snapshot, query) {
return snapshot.belongsTo('user').id;;

Copy link
Copy Markdown
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.

2 participants