{"action":"created","comment":{"url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/pulls/comments/48511411","id":48511411,"diff_hunk":"@@ -230,6 +260,20 @@ Convert the following ActiveRecord sequence to Mongoose:\n ```\n \n ```js\n-// Your answer...\n-```\n \n+//unsure if we need to save andy after creating the new gift.  I think the gift gets saved because we use the create\n+//method, but don't know if we need to save andy separately or not.  Also, I think I can use res.wishlistitems, assuming I\n+// set that up in my models but I'm not totally sure\n+var andy = Instructor.findOne(\"name\":\"Andy\").then(function(err, res){\n+  if (!err) {\n+    res.WishListItems.create({'description':\"Resin Laying Deer Figure, Gold\"}).then(function(err, res){\n+      andy.save().then(function(err, res){\n+        if (!err){\n+          console.log(\"saved\")\n+        }\n+      })\n+    })\n+  }\n+})\n+","path":"readme.md","position":179,"original_position":179,"commit_id":"27452befd88d150df9db5afc7579b4f1791da845","original_commit_id":"27452befd88d150df9db5afc7579b4f1791da845","user":{"login":"nolds9","id":10698044,"avatar_url":"https://avatars.githubusercontent.com/u/10698044?v=3","gravatar_id":"","url":"https://api.github.com/users/nolds9","html_url":"https://github.com/nolds9","followers_url":"https://api.github.com/users/nolds9/followers","following_url":"https://api.github.com/users/nolds9/following{/other_user}","gists_url":"https://api.github.com/users/nolds9/gists{/gist_id}","starred_url":"https://api.github.com/users/nolds9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nolds9/subscriptions","organizations_url":"https://api.github.com/users/nolds9/orgs","repos_url":"https://api.github.com/users/nolds9/repos","events_url":"https://api.github.com/users/nolds9/events{/privacy}","received_events_url":"https://api.github.com/users/nolds9/received_events","type":"User","site_admin":false},"body":":+1: Looks good, an alternative might be \r\n```\r\nInstructor.findOne({name: \"Andy\"), function(err, docs){\r\n  docs.wishlist_items.push({description: \"Resin Laying Deer Figurine, Gold\");\r\n  docs.save();\r\n});\r\n```","created_at":"2015-12-28T22:54:21Z","updated_at":"2015-12-28T22:54:21Z","html_url":"https://github.com/ga-dc/wdi7_quiz10/pull/4#discussion_r48511411","pull_request_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/ga-dc/wdi7_quiz10/pulls/comments/48511411"},"html":{"href":"https://github.com/ga-dc/wdi7_quiz10/pull/4#discussion_r48511411"},"pull_request":{"href":"https://api.github.com/repos/ga-dc/wdi7_quiz10/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/pulls/4","id":54191429,"html_url":"https://github.com/ga-dc/wdi7_quiz10/pull/4","diff_url":"https://github.com/ga-dc/wdi7_quiz10/pull/4.diff","patch_url":"https://github.com/ga-dc/wdi7_quiz10/pull/4.patch","issue_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/issues/4","number":4,"state":"open","locked":false,"title":"quiz10-tsolow solution","user":{"login":"solowt","id":10148145,"avatar_url":"https://avatars.githubusercontent.com/u/10148145?v=3","gravatar_id":"","url":"https://api.github.com/users/solowt","html_url":"https://github.com/solowt","followers_url":"https://api.github.com/users/solowt/followers","following_url":"https://api.github.com/users/solowt/following{/other_user}","gists_url":"https://api.github.com/users/solowt/gists{/gist_id}","starred_url":"https://api.github.com/users/solowt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solowt/subscriptions","organizations_url":"https://api.github.com/users/solowt/orgs","repos_url":"https://api.github.com/users/solowt/repos","events_url":"https://api.github.com/users/solowt/events{/privacy}","received_events_url":"https://api.github.com/users/solowt/received_events","type":"User","site_admin":false},"body":"comfort 4\r\ncompleteness 5\r\n\r\nunsure about the easiest way to approach the last question","created_at":"2015-12-20T02:30:21Z","updated_at":"2015-12-28T22:54:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"653bec49b9513da9edda9e80b0f678d8fd12507d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/pulls/4/commits","review_comments_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/pulls/4/comments","review_comment_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/issues/4/comments","statuses_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/statuses/27452befd88d150df9db5afc7579b4f1791da845","head":{"label":"solowt:tsolow_solution","ref":"tsolow_solution","sha":"27452befd88d150df9db5afc7579b4f1791da845","user":{"login":"solowt","id":10148145,"avatar_url":"https://avatars.githubusercontent.com/u/10148145?v=3","gravatar_id":"","url":"https://api.github.com/users/solowt","html_url":"https://github.com/solowt","followers_url":"https://api.github.com/users/solowt/followers","following_url":"https://api.github.com/users/solowt/following{/other_user}","gists_url":"https://api.github.com/users/solowt/gists{/gist_id}","starred_url":"https://api.github.com/users/solowt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solowt/subscriptions","organizations_url":"https://api.github.com/users/solowt/orgs","repos_url":"https://api.github.com/users/solowt/repos","events_url":"https://api.github.com/users/solowt/events{/privacy}","received_events_url":"https://api.github.com/users/solowt/received_events","type":"User","site_admin":false},"repo":{"id":48302638,"name":"wdi7_quiz10","full_name":"solowt/wdi7_quiz10","owner":{"login":"solowt","id":10148145,"avatar_url":"https://avatars.githubusercontent.com/u/10148145?v=3","gravatar_id":"","url":"https://api.github.com/users/solowt","html_url":"https://github.com/solowt","followers_url":"https://api.github.com/users/solowt/followers","following_url":"https://api.github.com/users/solowt/following{/other_user}","gists_url":"https://api.github.com/users/solowt/gists{/gist_id}","starred_url":"https://api.github.com/users/solowt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solowt/subscriptions","organizations_url":"https://api.github.com/users/solowt/orgs","repos_url":"https://api.github.com/users/solowt/repos","events_url":"https://api.github.com/users/solowt/events{/privacy}","received_events_url":"https://api.github.com/users/solowt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/solowt/wdi7_quiz10","description":"","fork":true,"url":"https://api.github.com/repos/solowt/wdi7_quiz10","forks_url":"https://api.github.com/repos/solowt/wdi7_quiz10/forks","keys_url":"https://api.github.com/repos/solowt/wdi7_quiz10/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solowt/wdi7_quiz10/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solowt/wdi7_quiz10/teams","hooks_url":"https://api.github.com/repos/solowt/wdi7_quiz10/hooks","issue_events_url":"https://api.github.com/repos/solowt/wdi7_quiz10/issues/events{/number}","events_url":"https://api.github.com/repos/solowt/wdi7_quiz10/events","assignees_url":"https://api.github.com/repos/solowt/wdi7_quiz10/assignees{/user}","branches_url":"https://api.github.com/repos/solowt/wdi7_quiz10/branches{/branch}","tags_url":"https://api.github.com/repos/solowt/wdi7_quiz10/tags","blobs_url":"https://api.github.com/repos/solowt/wdi7_quiz10/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solowt/wdi7_quiz10/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solowt/wdi7_quiz10/git/refs{/sha}","trees_url":"https://api.github.com/repos/solowt/wdi7_quiz10/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solowt/wdi7_quiz10/statuses/{sha}","languages_url":"https://api.github.com/repos/solowt/wdi7_quiz10/languages","stargazers_url":"https://api.github.com/repos/solowt/wdi7_quiz10/stargazers","contributors_url":"https://api.github.com/repos/solowt/wdi7_quiz10/contributors","subscribers_url":"https://api.github.com/repos/solowt/wdi7_quiz10/subscribers","subscription_url":"https://api.github.com/repos/solowt/wdi7_quiz10/subscription","commits_url":"https://api.github.com/repos/solowt/wdi7_quiz10/commits{/sha}","git_commits_url":"https://api.github.com/repos/solowt/wdi7_quiz10/git/commits{/sha}","comments_url":"https://api.github.com/repos/solowt/wdi7_quiz10/comments{/number}","issue_comment_url":"https://api.github.com/repos/solowt/wdi7_quiz10/issues/comments{/number}","contents_url":"https://api.github.com/repos/solowt/wdi7_quiz10/contents/{+path}","compare_url":"https://api.github.com/repos/solowt/wdi7_quiz10/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solowt/wdi7_quiz10/merges","archive_url":"https://api.github.com/repos/solowt/wdi7_quiz10/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solowt/wdi7_quiz10/downloads","issues_url":"https://api.github.com/repos/solowt/wdi7_quiz10/issues{/number}","pulls_url":"https://api.github.com/repos/solowt/wdi7_quiz10/pulls{/number}","milestones_url":"https://api.github.com/repos/solowt/wdi7_quiz10/milestones{/number}","notifications_url":"https://api.github.com/repos/solowt/wdi7_quiz10/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solowt/wdi7_quiz10/labels{/name}","releases_url":"https://api.github.com/repos/solowt/wdi7_quiz10/releases{/id}","created_at":"2015-12-20T00:52:38Z","updated_at":"2015-12-17T20:12:12Z","pushed_at":"2015-12-20T06:04:24Z","git_url":"git://github.com/solowt/wdi7_quiz10.git","ssh_url":"git@github.com:solowt/wdi7_quiz10.git","clone_url":"https://github.com/solowt/wdi7_quiz10.git","svn_url":"https://github.com/solowt/wdi7_quiz10","homepage":null,"size":2,"stargazers_count":0,"watchers_count":0,"language":null,"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":"ga-dc:master","ref":"master","sha":"b4d475ecc39085d218b890406a32f8c03683f87b","user":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"repo":{"id":48195959,"name":"wdi7_quiz10","full_name":"ga-dc/wdi7_quiz10","owner":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-dc/wdi7_quiz10","description":"","fork":false,"url":"https://api.github.com/repos/ga-dc/wdi7_quiz10","forks_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/forks","keys_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/teams","hooks_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/hooks","issue_events_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/issues/events{/number}","events_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/events","assignees_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/assignees{/user}","branches_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/branches{/branch}","tags_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/tags","blobs_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/languages","stargazers_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/stargazers","contributors_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/contributors","subscribers_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/subscribers","subscription_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/subscription","commits_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/contents/{+path}","compare_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/merges","archive_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/downloads","issues_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/issues{/number}","pulls_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/labels{/name}","releases_url":"https://api.github.com/repos/ga-dc/wdi7_quiz10/releases{/id}","created_at":"2015-12-17T20:12:12Z","updated_at":"2015-12-17T20:12:12Z","pushed_at":"2015-12-28T19:54:03Z","git_url":"git://github.com/ga-dc/wdi7_quiz10.git","ssh_url":"git@github.com:ga-dc/wdi7_quiz10.git","clone_url":"https://github.com/ga-dc/wdi7_quiz10.git","svn_url":"https://github.com/ga-dc/wdi7_quiz10","homepage":null,"size":5,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":53,"mirror_url":null,"open_issues_count":16,"forks":53,"open_issues":16,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga-dc/wdi7_quiz10/pulls/4"},"html":{"href":"https://github.com/ga-dc/wdi7_quiz10/pull/4"},"issue":{"href":"https://api.github.com/repos/ga-dc/wdi7_quiz10/issues/4"},"comments":{"href":"https://api.github.com/repos/ga-dc/wdi7_quiz10/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/ga-dc/wdi7_quiz10/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/ga-dc/wdi7_quiz10/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga-dc/wdi7_quiz10/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/ga-dc/wdi7_quiz10/statuses/27452befd88d150df9db5afc7579b4f1791da845"}}}}