{"action":"created","comment":{"url":"https://api.github.com/repos/ga-wdi-exercises/scribble/pulls/comments/56774134","id":56774134,"diff_hunk":"@@ -0,0 +1,33 @@\n+class CommentsController < ApplicationController\n+  def new\n+    @post = Post.find(params[:post_id])\n+    @comment = @post.comments.new\n+  end\n+\n+  def create\n+    @post = Post.find(params[:post_id])\n+    @comment = @post.comments.create! comment_params\n+    redirect_to @post\n+  end\n+\n+  def edit\n+    @post = Post.find(params[:post_id])\n+    @comment = @post.comments.find(params[:id])\n+  end\n+\n+  def update\n+    @post = Post.find(params[:post_id])\n+    @comment = @post.comments.update params[:id], comment_params\n+    redirect_to @post\n+  end\n+\n+  def destroy\n+    @post = Post.find(params[:post_id])\n+    @comment = @post.comments.find(params[:id]).destroy","path":"scribble/app/controllers/comments_controller.rb","position":26,"original_position":26,"commit_id":"e98bb708d6fee1bb2d181619dd65ac2722b1a17a","original_commit_id":"e98bb708d6fee1bb2d181619dd65ac2722b1a17a","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":"don't think you need to find the `post` here, can just do: \r\n```\r\n@comment = Comment.find(params[:id])\r\n@comment.destroy\r\n```","created_at":"2016-03-20T22:52:53Z","updated_at":"2016-03-20T22:52:53Z","html_url":"https://github.com/ga-wdi-exercises/scribble/pull/152#discussion_r56774134","pull_request_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/pulls/152","_links":{"self":{"href":"https://api.github.com/repos/ga-wdi-exercises/scribble/pulls/comments/56774134"},"html":{"href":"https://github.com/ga-wdi-exercises/scribble/pull/152#discussion_r56774134"},"pull_request":{"href":"https://api.github.com/repos/ga-wdi-exercises/scribble/pulls/152"}}},"pull_request":{"url":"https://api.github.com/repos/ga-wdi-exercises/scribble/pulls/152","id":63306877,"html_url":"https://github.com/ga-wdi-exercises/scribble/pull/152","diff_url":"https://github.com/ga-wdi-exercises/scribble/pull/152.diff","patch_url":"https://github.com/ga-wdi-exercises/scribble/pull/152.patch","issue_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/issues/152","number":152,"state":"open","locked":false,"title":"Patricks solution","user":{"login":"pkmoran","id":14882519,"avatar_url":"https://avatars.githubusercontent.com/u/14882519?v=3","gravatar_id":"","url":"https://api.github.com/users/pkmoran","html_url":"https://github.com/pkmoran","followers_url":"https://api.github.com/users/pkmoran/followers","following_url":"https://api.github.com/users/pkmoran/following{/other_user}","gists_url":"https://api.github.com/users/pkmoran/gists{/gist_id}","starred_url":"https://api.github.com/users/pkmoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkmoran/subscriptions","organizations_url":"https://api.github.com/users/pkmoran/orgs","repos_url":"https://api.github.com/users/pkmoran/repos","events_url":"https://api.github.com/users/pkmoran/events{/privacy}","received_events_url":"https://api.github.com/users/pkmoran/received_events","type":"User","site_admin":false},"body":"comfort_level: 4\r\ncompleteness: 5\r\n\r\nSo, there is absolutely zero styling. I spent the majority of my time trying to add users. This was before I realized that the lesson plan had been updated and that we didn't need to add users. I did it by trying to go through Mike Hartl tutorial. I only got as far as creating a user and adding them to the database.\r\n\r\nYou can create, update and delete both posts and comments.","created_at":"2016-03-17T23:11:06Z","updated_at":"2016-03-20T22:52:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"357d70a8ad9c465afa0d2b25c32e5ec082c4f569","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/pulls/152/commits","review_comments_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/pulls/152/comments","review_comment_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/issues/152/comments","statuses_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/statuses/e98bb708d6fee1bb2d181619dd65ac2722b1a17a","head":{"label":"pkmoran:patricks-solution","ref":"patricks-solution","sha":"e98bb708d6fee1bb2d181619dd65ac2722b1a17a","user":{"login":"pkmoran","id":14882519,"avatar_url":"https://avatars.githubusercontent.com/u/14882519?v=3","gravatar_id":"","url":"https://api.github.com/users/pkmoran","html_url":"https://github.com/pkmoran","followers_url":"https://api.github.com/users/pkmoran/followers","following_url":"https://api.github.com/users/pkmoran/following{/other_user}","gists_url":"https://api.github.com/users/pkmoran/gists{/gist_id}","starred_url":"https://api.github.com/users/pkmoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkmoran/subscriptions","organizations_url":"https://api.github.com/users/pkmoran/orgs","repos_url":"https://api.github.com/users/pkmoran/repos","events_url":"https://api.github.com/users/pkmoran/events{/privacy}","received_events_url":"https://api.github.com/users/pkmoran/received_events","type":"User","site_admin":false},"repo":{"id":53698452,"name":"scribble","full_name":"pkmoran/scribble","owner":{"login":"pkmoran","id":14882519,"avatar_url":"https://avatars.githubusercontent.com/u/14882519?v=3","gravatar_id":"","url":"https://api.github.com/users/pkmoran","html_url":"https://github.com/pkmoran","followers_url":"https://api.github.com/users/pkmoran/followers","following_url":"https://api.github.com/users/pkmoran/following{/other_user}","gists_url":"https://api.github.com/users/pkmoran/gists{/gist_id}","starred_url":"https://api.github.com/users/pkmoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkmoran/subscriptions","organizations_url":"https://api.github.com/users/pkmoran/orgs","repos_url":"https://api.github.com/users/pkmoran/repos","events_url":"https://api.github.com/users/pkmoran/events{/privacy}","received_events_url":"https://api.github.com/users/pkmoran/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pkmoran/scribble","description":"[rails]","fork":true,"url":"https://api.github.com/repos/pkmoran/scribble","forks_url":"https://api.github.com/repos/pkmoran/scribble/forks","keys_url":"https://api.github.com/repos/pkmoran/scribble/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pkmoran/scribble/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pkmoran/scribble/teams","hooks_url":"https://api.github.com/repos/pkmoran/scribble/hooks","issue_events_url":"https://api.github.com/repos/pkmoran/scribble/issues/events{/number}","events_url":"https://api.github.com/repos/pkmoran/scribble/events","assignees_url":"https://api.github.com/repos/pkmoran/scribble/assignees{/user}","branches_url":"https://api.github.com/repos/pkmoran/scribble/branches{/branch}","tags_url":"https://api.github.com/repos/pkmoran/scribble/tags","blobs_url":"https://api.github.com/repos/pkmoran/scribble/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pkmoran/scribble/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pkmoran/scribble/git/refs{/sha}","trees_url":"https://api.github.com/repos/pkmoran/scribble/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pkmoran/scribble/statuses/{sha}","languages_url":"https://api.github.com/repos/pkmoran/scribble/languages","stargazers_url":"https://api.github.com/repos/pkmoran/scribble/stargazers","contributors_url":"https://api.github.com/repos/pkmoran/scribble/contributors","subscribers_url":"https://api.github.com/repos/pkmoran/scribble/subscribers","subscription_url":"https://api.github.com/repos/pkmoran/scribble/subscription","commits_url":"https://api.github.com/repos/pkmoran/scribble/commits{/sha}","git_commits_url":"https://api.github.com/repos/pkmoran/scribble/git/commits{/sha}","comments_url":"https://api.github.com/repos/pkmoran/scribble/comments{/number}","issue_comment_url":"https://api.github.com/repos/pkmoran/scribble/issues/comments{/number}","contents_url":"https://api.github.com/repos/pkmoran/scribble/contents/{+path}","compare_url":"https://api.github.com/repos/pkmoran/scribble/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pkmoran/scribble/merges","archive_url":"https://api.github.com/repos/pkmoran/scribble/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pkmoran/scribble/downloads","issues_url":"https://api.github.com/repos/pkmoran/scribble/issues{/number}","pulls_url":"https://api.github.com/repos/pkmoran/scribble/pulls{/number}","milestones_url":"https://api.github.com/repos/pkmoran/scribble/milestones{/number}","notifications_url":"https://api.github.com/repos/pkmoran/scribble/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pkmoran/scribble/labels{/name}","releases_url":"https://api.github.com/repos/pkmoran/scribble/releases{/id}","deployments_url":"https://api.github.com/repos/pkmoran/scribble/deployments","created_at":"2016-03-11T21:43:02Z","updated_at":"2016-02-02T23:47:21Z","pushed_at":"2016-03-17T23:07:49Z","git_url":"git://github.com/pkmoran/scribble.git","ssh_url":"git@github.com:pkmoran/scribble.git","clone_url":"https://github.com/pkmoran/scribble.git","svn_url":"https://github.com/pkmoran/scribble","homepage":"https://wdi-scribble.herokuapp.com","size":106,"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-wdi-exercises:master","ref":"master","sha":"73bfae96c10099c8400906999759942fcfe02195","user":{"login":"ga-wdi-exercises","id":16946328,"avatar_url":"https://avatars.githubusercontent.com/u/16946328?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-wdi-exercises","html_url":"https://github.com/ga-wdi-exercises","followers_url":"https://api.github.com/users/ga-wdi-exercises/followers","following_url":"https://api.github.com/users/ga-wdi-exercises/following{/other_user}","gists_url":"https://api.github.com/users/ga-wdi-exercises/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-wdi-exercises/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-wdi-exercises/subscriptions","organizations_url":"https://api.github.com/users/ga-wdi-exercises/orgs","repos_url":"https://api.github.com/users/ga-wdi-exercises/repos","events_url":"https://api.github.com/users/ga-wdi-exercises/events{/privacy}","received_events_url":"https://api.github.com/users/ga-wdi-exercises/received_events","type":"Organization","site_admin":false},"repo":{"id":39733014,"name":"scribble","full_name":"ga-wdi-exercises/scribble","owner":{"login":"ga-wdi-exercises","id":16946328,"avatar_url":"https://avatars.githubusercontent.com/u/16946328?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-wdi-exercises","html_url":"https://github.com/ga-wdi-exercises","followers_url":"https://api.github.com/users/ga-wdi-exercises/followers","following_url":"https://api.github.com/users/ga-wdi-exercises/following{/other_user}","gists_url":"https://api.github.com/users/ga-wdi-exercises/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-wdi-exercises/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-wdi-exercises/subscriptions","organizations_url":"https://api.github.com/users/ga-wdi-exercises/orgs","repos_url":"https://api.github.com/users/ga-wdi-exercises/repos","events_url":"https://api.github.com/users/ga-wdi-exercises/events{/privacy}","received_events_url":"https://api.github.com/users/ga-wdi-exercises/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-wdi-exercises/scribble","description":"[rails]","fork":false,"url":"https://api.github.com/repos/ga-wdi-exercises/scribble","forks_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/forks","keys_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/teams","hooks_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/hooks","issue_events_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/issues/events{/number}","events_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/events","assignees_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/assignees{/user}","branches_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/branches{/branch}","tags_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/tags","blobs_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/languages","stargazers_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/stargazers","contributors_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/contributors","subscribers_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/subscribers","subscription_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/subscription","commits_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/contents/{+path}","compare_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/merges","archive_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/downloads","issues_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/issues{/number}","pulls_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/labels{/name}","releases_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/releases{/id}","deployments_url":"https://api.github.com/repos/ga-wdi-exercises/scribble/deployments","created_at":"2015-07-26T16:46:45Z","updated_at":"2016-02-02T23:47:21Z","pushed_at":"2016-03-18T13:53:23Z","git_url":"git://github.com/ga-wdi-exercises/scribble.git","ssh_url":"git@github.com:ga-wdi-exercises/scribble.git","clone_url":"https://github.com/ga-wdi-exercises/scribble.git","svn_url":"https://github.com/ga-wdi-exercises/scribble","homepage":"https://wdi-scribble.herokuapp.com","size":36758,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":112,"mirror_url":null,"open_issues_count":32,"forks":112,"open_issues":32,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga-wdi-exercises/scribble/pulls/152"},"html":{"href":"https://github.com/ga-wdi-exercises/scribble/pull/152"},"issue":{"href":"https://api.github.com/repos/ga-wdi-exercises/scribble/issues/152"},"comments":{"href":"https://api.github.com/repos/ga-wdi-exercises/scribble/issues/152/comments"},"review_comments":{"href":"https://api.github.com/repos/ga-wdi-exercises/scribble/pulls/152/comments"},"review_comment":{"href":"https://api.github.com/repos/ga-wdi-exercises/scribble/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga-wdi-exercises/scribble/pulls/152/commits"},"statuses":{"href":"https://api.github.com/repos/ga-wdi-exercises/scribble/statuses/e98bb708d6fee1bb2d181619dd65ac2722b1a17a"}}}}