forked from emberjs/data
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle absolute / relative paths and full URLs in links
fixes emberjs#1365 absolute paths start with a leading / and will use only the provided host provided to the adapter cf. { posts: [{ id: 1, links: { comments: "/posts/1/comments" }}] } relative paths construct an URL from the record the relationship is embedded in: cf. { posts: [{ id: 1, links: { comments: "comments" }}] } full URLs links will pass through the link transparently: cf. { posts: [{ id: 1, links: { comments: "http://example.com/posts/1/comments" }}] } note that all of the above examples are equivalent to each other.
- Loading branch information
Showing
2 changed files
with
78 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters