{"action":"created","comment":{"url":"https://api.github.com/repos/emberjs/guides/pulls/comments/68171675","id":68171675,"diff_hunk":"@@ -0,0 +1,398 @@\n+For Super Rentals, we want to be able to display all rentals and allow the user to view additional information for each.\n+To do this, we can generate `rentals` route to display all rentals and a `show` sub-route to display additional information.\n+\n+# A Parent Route\n+\n+To begin, let's generate our new route.\n+We'll call this `rentals`, since it will list all of our current rental properties.\n+\n+```shell\n+ember g route rentals\n+```\n+\n+You will see output like this:\n+\n+```text\n+installing route\n+  create app/routes/rentals.js\n+  create app/templates/rentals.hbs\n+updating router\n+  add route rentals\n+installing route-test\n+  create tests/unit/routes/rentals-test.js\n+```\n+\n+If it is unclear what Ember is doing for us here visit the [Routes and Templates tutorial](../routes-and-templates) for more information.\n+\n+Let's start by opening our new Handlebars template (`app/templates/rentals.hbs`).\n+Ember generates route-level templates files with an `outlet`.\n+\n+```app/templates/rentals.hbs\n+{{outlet}}\n+```\n+\n+Much like our application template (`app/templates/application.hbs`), the `outlet` is where our sub-routes will render.\n+This means that any content on our parent route will be present as we browse down through our child routes, allowing us to add things like navigation, footers or sidebars.\n+Let's start by adding welcome header and link to our About page (`app/templates/about.hbs`).\n+\n+```app/templates/rentals.hbs\n+<div class=\"jumbo\">\n+  <div class=\"right tomster\"></div>\n+  <h2>Welcome!</h2>\n+  <p>\n+    We hope you find exactly what you're looking for in a place to stay.\n+  </p>\n+  {{#link-to 'about' class=\"button\"}}\n+    About Us\n+  {{/link-to}}\n+</div>\n+\n+{{outlet}}\n+```\n+\n+Run `ember serve` (or `ember s` for short) from the shell to start the Ember development server,\n+and then go to `localhost:4200/rentals` to see our new app in action!\n+\n+# Creating a Sub-route\n+\n+Next, we will want to create a sub-route that will list information for a specific rental.\n+To do this, we will need to update a couple of files.\n+To find a specific rental, we will want to use Ember Data's `queryRecord` function [Finding Records section](../../models/finding-records/).\n+This means we need to be able to search by a unique key in order to return the specific rental we want.\n+Many APIs return a `slug`, which is a URL-friendly string to identify a record.\n+\n+While on the `show` route, we will also want to show additional information about our specific rental.\n+\n+In order to do this, we need to modify the Mirage `config.js` file.\n+If you need a refresher on using Mirage, visit the [Installing Addons section](../installing-addons)","path":"source/localizable/tutorial/subroutes.md","position":67,"original_position":67,"commit_id":"c15facbbc5be56cd0663621ce113f1e99ed1c883","original_commit_id":"c15facbbc5be56cd0663621ce113f1e99ed1c883","user":{"login":"acorncom","id":802505,"avatar_url":"https://avatars.githubusercontent.com/u/802505?v=3","gravatar_id":"","url":"https://api.github.com/users/acorncom","html_url":"https://github.com/acorncom","followers_url":"https://api.github.com/users/acorncom/followers","following_url":"https://api.github.com/users/acorncom/following{/other_user}","gists_url":"https://api.github.com/users/acorncom/gists{/gist_id}","starred_url":"https://api.github.com/users/acorncom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acorncom/subscriptions","organizations_url":"https://api.github.com/users/acorncom/orgs","repos_url":"https://api.github.com/users/acorncom/repos","events_url":"https://api.github.com/users/acorncom/events{/privacy}","received_events_url":"https://api.github.com/users/acorncom/received_events","type":"User","site_admin":false},"body":"refresher on **how Mirage works, go back to** the Installing Addons section","created_at":"2016-06-23T03:41:48Z","updated_at":"2016-06-23T03:41:48Z","html_url":"https://github.com/emberjs/guides/pull/1443#discussion_r68171675","pull_request_url":"https://api.github.com/repos/emberjs/guides/pulls/1443","_links":{"self":{"href":"https://api.github.com/repos/emberjs/guides/pulls/comments/68171675"},"html":{"href":"https://github.com/emberjs/guides/pull/1443#discussion_r68171675"},"pull_request":{"href":"https://api.github.com/repos/emberjs/guides/pulls/1443"}}},"pull_request":{"url":"https://api.github.com/repos/emberjs/guides/pulls/1443","id":71811344,"html_url":"https://github.com/emberjs/guides/pull/1443","diff_url":"https://github.com/emberjs/guides/pull/1443.diff","patch_url":"https://github.com/emberjs/guides/pull/1443.patch","issue_url":"https://api.github.com/repos/emberjs/guides/issues/1443","number":1443,"state":"open","locked":false,"title":"add tutorial for sub-routes","user":{"login":"sbatson5","id":881981,"avatar_url":"https://avatars.githubusercontent.com/u/881981?v=3","gravatar_id":"","url":"https://api.github.com/users/sbatson5","html_url":"https://github.com/sbatson5","followers_url":"https://api.github.com/users/sbatson5/followers","following_url":"https://api.github.com/users/sbatson5/following{/other_user}","gists_url":"https://api.github.com/users/sbatson5/gists{/gist_id}","starred_url":"https://api.github.com/users/sbatson5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbatson5/subscriptions","organizations_url":"https://api.github.com/users/sbatson5/orgs","repos_url":"https://api.github.com/users/sbatson5/repos","events_url":"https://api.github.com/users/sbatson5/events{/privacy}","received_events_url":"https://api.github.com/users/sbatson5/received_events","type":"User","site_admin":false},"body":"Tutorial for adding sub-routes using the super-rentals app.\r\nCorresponding Super-Rentals PR: https://github.com/emberjs/super-rentals/pull/24\r\n\r\nThe thought process is to add an `rentals` route with 2 subroutes:\r\n\r\n1. Index route - renders all rentals and allows user to select one\r\n2. Show route - lists information about 1 specific rental\r\n\r\nThe `rentals/index` route varies slightly from the application's `index` route. First, it has a link to select individual rentals (link-to show).\r\nSecond, it doesn't include the filter.  This is easy to add in if people feel it's necessary, but I felt like it was out of the scope here.","created_at":"2016-05-28T20:49:55Z","updated_at":"2016-06-23T03:41:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a819b59a33c98eed5f8bce6a9630af6361b4e76f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/emberjs/guides/pulls/1443/commits","review_comments_url":"https://api.github.com/repos/emberjs/guides/pulls/1443/comments","review_comment_url":"https://api.github.com/repos/emberjs/guides/pulls/comments{/number}","comments_url":"https://api.github.com/repos/emberjs/guides/issues/1443/comments","statuses_url":"https://api.github.com/repos/emberjs/guides/statuses/c15facbbc5be56cd0663621ce113f1e99ed1c883","head":{"label":"sbatson5:add-subroutes-tutorial","ref":"add-subroutes-tutorial","sha":"c15facbbc5be56cd0663621ce113f1e99ed1c883","user":{"login":"sbatson5","id":881981,"avatar_url":"https://avatars.githubusercontent.com/u/881981?v=3","gravatar_id":"","url":"https://api.github.com/users/sbatson5","html_url":"https://github.com/sbatson5","followers_url":"https://api.github.com/users/sbatson5/followers","following_url":"https://api.github.com/users/sbatson5/following{/other_user}","gists_url":"https://api.github.com/users/sbatson5/gists{/gist_id}","starred_url":"https://api.github.com/users/sbatson5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbatson5/subscriptions","organizations_url":"https://api.github.com/users/sbatson5/orgs","repos_url":"https://api.github.com/users/sbatson5/repos","events_url":"https://api.github.com/users/sbatson5/events{/privacy}","received_events_url":"https://api.github.com/users/sbatson5/received_events","type":"User","site_admin":false},"repo":{"id":59838425,"name":"guides","full_name":"sbatson5/guides","owner":{"login":"sbatson5","id":881981,"avatar_url":"https://avatars.githubusercontent.com/u/881981?v=3","gravatar_id":"","url":"https://api.github.com/users/sbatson5","html_url":"https://github.com/sbatson5","followers_url":"https://api.github.com/users/sbatson5/followers","following_url":"https://api.github.com/users/sbatson5/following{/other_user}","gists_url":"https://api.github.com/users/sbatson5/gists{/gist_id}","starred_url":"https://api.github.com/users/sbatson5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbatson5/subscriptions","organizations_url":"https://api.github.com/users/sbatson5/orgs","repos_url":"https://api.github.com/users/sbatson5/repos","events_url":"https://api.github.com/users/sbatson5/events{/privacy}","received_events_url":"https://api.github.com/users/sbatson5/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sbatson5/guides","description":"The source for http://guides.emberjs.com","fork":true,"url":"https://api.github.com/repos/sbatson5/guides","forks_url":"https://api.github.com/repos/sbatson5/guides/forks","keys_url":"https://api.github.com/repos/sbatson5/guides/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sbatson5/guides/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sbatson5/guides/teams","hooks_url":"https://api.github.com/repos/sbatson5/guides/hooks","issue_events_url":"https://api.github.com/repos/sbatson5/guides/issues/events{/number}","events_url":"https://api.github.com/repos/sbatson5/guides/events","assignees_url":"https://api.github.com/repos/sbatson5/guides/assignees{/user}","branches_url":"https://api.github.com/repos/sbatson5/guides/branches{/branch}","tags_url":"https://api.github.com/repos/sbatson5/guides/tags","blobs_url":"https://api.github.com/repos/sbatson5/guides/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sbatson5/guides/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sbatson5/guides/git/refs{/sha}","trees_url":"https://api.github.com/repos/sbatson5/guides/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sbatson5/guides/statuses/{sha}","languages_url":"https://api.github.com/repos/sbatson5/guides/languages","stargazers_url":"https://api.github.com/repos/sbatson5/guides/stargazers","contributors_url":"https://api.github.com/repos/sbatson5/guides/contributors","subscribers_url":"https://api.github.com/repos/sbatson5/guides/subscribers","subscription_url":"https://api.github.com/repos/sbatson5/guides/subscription","commits_url":"https://api.github.com/repos/sbatson5/guides/commits{/sha}","git_commits_url":"https://api.github.com/repos/sbatson5/guides/git/commits{/sha}","comments_url":"https://api.github.com/repos/sbatson5/guides/comments{/number}","issue_comment_url":"https://api.github.com/repos/sbatson5/guides/issues/comments{/number}","contents_url":"https://api.github.com/repos/sbatson5/guides/contents/{+path}","compare_url":"https://api.github.com/repos/sbatson5/guides/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sbatson5/guides/merges","archive_url":"https://api.github.com/repos/sbatson5/guides/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sbatson5/guides/downloads","issues_url":"https://api.github.com/repos/sbatson5/guides/issues{/number}","pulls_url":"https://api.github.com/repos/sbatson5/guides/pulls{/number}","milestones_url":"https://api.github.com/repos/sbatson5/guides/milestones{/number}","notifications_url":"https://api.github.com/repos/sbatson5/guides/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sbatson5/guides/labels{/name}","releases_url":"https://api.github.com/repos/sbatson5/guides/releases{/id}","deployments_url":"https://api.github.com/repos/sbatson5/guides/deployments","created_at":"2016-05-27T14:00:35Z","updated_at":"2016-05-27T14:00:40Z","pushed_at":"2016-06-17T02:07:17Z","git_url":"git://github.com/sbatson5/guides.git","ssh_url":"git@github.com:sbatson5/guides.git","clone_url":"https://github.com/sbatson5/guides.git","svn_url":"https://github.com/sbatson5/guides","homepage":null,"size":30508,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"emberjs:master","ref":"master","sha":"5f76edbf430cc2733d671fad76196b1169fb8f08","user":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"repo":{"id":22767401,"name":"guides","full_name":"emberjs/guides","owner":{"login":"emberjs","id":1253363,"avatar_url":"https://avatars.githubusercontent.com/u/1253363?v=3","gravatar_id":"","url":"https://api.github.com/users/emberjs","html_url":"https://github.com/emberjs","followers_url":"https://api.github.com/users/emberjs/followers","following_url":"https://api.github.com/users/emberjs/following{/other_user}","gists_url":"https://api.github.com/users/emberjs/gists{/gist_id}","starred_url":"https://api.github.com/users/emberjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emberjs/subscriptions","organizations_url":"https://api.github.com/users/emberjs/orgs","repos_url":"https://api.github.com/users/emberjs/repos","events_url":"https://api.github.com/users/emberjs/events{/privacy}","received_events_url":"https://api.github.com/users/emberjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/emberjs/guides","description":"The source for http://guides.emberjs.com","fork":false,"url":"https://api.github.com/repos/emberjs/guides","forks_url":"https://api.github.com/repos/emberjs/guides/forks","keys_url":"https://api.github.com/repos/emberjs/guides/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emberjs/guides/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emberjs/guides/teams","hooks_url":"https://api.github.com/repos/emberjs/guides/hooks","issue_events_url":"https://api.github.com/repos/emberjs/guides/issues/events{/number}","events_url":"https://api.github.com/repos/emberjs/guides/events","assignees_url":"https://api.github.com/repos/emberjs/guides/assignees{/user}","branches_url":"https://api.github.com/repos/emberjs/guides/branches{/branch}","tags_url":"https://api.github.com/repos/emberjs/guides/tags","blobs_url":"https://api.github.com/repos/emberjs/guides/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emberjs/guides/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emberjs/guides/git/refs{/sha}","trees_url":"https://api.github.com/repos/emberjs/guides/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emberjs/guides/statuses/{sha}","languages_url":"https://api.github.com/repos/emberjs/guides/languages","stargazers_url":"https://api.github.com/repos/emberjs/guides/stargazers","contributors_url":"https://api.github.com/repos/emberjs/guides/contributors","subscribers_url":"https://api.github.com/repos/emberjs/guides/subscribers","subscription_url":"https://api.github.com/repos/emberjs/guides/subscription","commits_url":"https://api.github.com/repos/emberjs/guides/commits{/sha}","git_commits_url":"https://api.github.com/repos/emberjs/guides/git/commits{/sha}","comments_url":"https://api.github.com/repos/emberjs/guides/comments{/number}","issue_comment_url":"https://api.github.com/repos/emberjs/guides/issues/comments{/number}","contents_url":"https://api.github.com/repos/emberjs/guides/contents/{+path}","compare_url":"https://api.github.com/repos/emberjs/guides/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emberjs/guides/merges","archive_url":"https://api.github.com/repos/emberjs/guides/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emberjs/guides/downloads","issues_url":"https://api.github.com/repos/emberjs/guides/issues{/number}","pulls_url":"https://api.github.com/repos/emberjs/guides/pulls{/number}","milestones_url":"https://api.github.com/repos/emberjs/guides/milestones{/number}","notifications_url":"https://api.github.com/repos/emberjs/guides/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emberjs/guides/labels{/name}","releases_url":"https://api.github.com/repos/emberjs/guides/releases{/id}","deployments_url":"https://api.github.com/repos/emberjs/guides/deployments","created_at":"2014-08-08T18:25:02Z","updated_at":"2016-06-22T08:11:17Z","pushed_at":"2016-06-22T19:40:01Z","git_url":"git://github.com/emberjs/guides.git","ssh_url":"git@github.com:emberjs/guides.git","clone_url":"https://github.com/emberjs/guides.git","svn_url":"https://github.com/emberjs/guides","homepage":null,"size":32236,"stargazers_count":203,"watchers_count":203,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":732,"mirror_url":null,"open_issues_count":53,"forks":732,"open_issues":53,"watchers":203,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/emberjs/guides/pulls/1443"},"html":{"href":"https://github.com/emberjs/guides/pull/1443"},"issue":{"href":"https://api.github.com/repos/emberjs/guides/issues/1443"},"comments":{"href":"https://api.github.com/repos/emberjs/guides/issues/1443/comments"},"review_comments":{"href":"https://api.github.com/repos/emberjs/guides/pulls/1443/comments"},"review_comment":{"href":"https://api.github.com/repos/emberjs/guides/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/emberjs/guides/pulls/1443/commits"},"statuses":{"href":"https://api.github.com/repos/emberjs/guides/statuses/c15facbbc5be56cd0663621ce113f1e99ed1c883"}}}}
{"actor":{"display_login":"acorncom"}}