{"action":"created","comment":{"url":"https://api.github.com/repos/vikingeducation/project_danebook/pulls/comments/75780571","id":75780571,"diff_hunk":"@@ -0,0 +1,39 @@\n+class CommentsController < ApplicationController\n+\n+  def create\n+    @commentable = get_commentable_resource\n+    creation_params = whitelisted_comment_params.to_h.merge({user_id: current_user.id})\n+    @comment = @commentable.comments.build(creation_params)\n+    if @comment.save\n+      flash[:success] = 'Comment created!'\n+      redirect_to :back\n+    else\n+      flash[:error] = 'Unable to post comment :('\n+      redirect_to :back\n+    end\n+  end\n+\n+  def destroy\n+    if Comment.find(params[:id]).destroy\n+      flash[:success] = 'Comment deleted'\n+      redirect_to :back\n+    else\n+      flash[:error] = 'Unable to delete comment'\n+      redirect_to :back\n+    end\n+  end\n+\n+\n+  private\n+\n+  def get_commentable_resource","path":"app/controllers/comments_controller.rb","position":29,"original_position":29,"commit_id":"7b5a0deed1dae95c53fda44dd8cdea5dedfcf6b0","original_commit_id":"7b5a0deed1dae95c53fda44dd8cdea5dedfcf6b0","user":{"login":"adrianmui","id":2206350,"avatar_url":"https://avatars.githubusercontent.com/u/2206350?v=3","gravatar_id":"","url":"https://api.github.com/users/adrianmui","html_url":"https://github.com/adrianmui","followers_url":"https://api.github.com/users/adrianmui/followers","following_url":"https://api.github.com/users/adrianmui/following{/other_user}","gists_url":"https://api.github.com/users/adrianmui/gists{/gist_id}","starred_url":"https://api.github.com/users/adrianmui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrianmui/subscriptions","organizations_url":"https://api.github.com/users/adrianmui/orgs","repos_url":"https://api.github.com/users/adrianmui/repos","events_url":"https://api.github.com/users/adrianmui/events{/privacy}","received_events_url":"https://api.github.com/users/adrianmui/received_events","type":"User","site_admin":false},"body":"ima steal dis :)","created_at":"2016-08-22T23:47:58Z","updated_at":"2016-08-22T23:47:58Z","html_url":"https://github.com/vikingeducation/project_danebook/pull/37#discussion_r75780571","pull_request_url":"https://api.github.com/repos/vikingeducation/project_danebook/pulls/37","_links":{"self":{"href":"https://api.github.com/repos/vikingeducation/project_danebook/pulls/comments/75780571"},"html":{"href":"https://github.com/vikingeducation/project_danebook/pull/37#discussion_r75780571"},"pull_request":{"href":"https://api.github.com/repos/vikingeducation/project_danebook/pulls/37"}}},"pull_request":{"url":"https://api.github.com/repos/vikingeducation/project_danebook/pulls/37","id":81195076,"html_url":"https://github.com/vikingeducation/project_danebook/pull/37","diff_url":"https://github.com/vikingeducation/project_danebook/pull/37.diff","patch_url":"https://github.com/vikingeducation/project_danebook/pull/37.patch","issue_url":"https://api.github.com/repos/vikingeducation/project_danebook/issues/37","number":37,"state":"open","locked":false,"title":"Morgan Martin's Project Danebook","user":{"login":"morgancmartin","id":4595149,"avatar_url":"https://avatars.githubusercontent.com/u/4595149?v=3","gravatar_id":"","url":"https://api.github.com/users/morgancmartin","html_url":"https://github.com/morgancmartin","followers_url":"https://api.github.com/users/morgancmartin/followers","following_url":"https://api.github.com/users/morgancmartin/following{/other_user}","gists_url":"https://api.github.com/users/morgancmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/morgancmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morgancmartin/subscriptions","organizations_url":"https://api.github.com/users/morgancmartin/orgs","repos_url":"https://api.github.com/users/morgancmartin/repos","events_url":"https://api.github.com/users/morgancmartin/events{/privacy}","received_events_url":"https://api.github.com/users/morgancmartin/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-12T23:06:08Z","updated_at":"2016-08-22T23:47:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ea487f5f0aff550d23304bc6b43bd32f65768cb0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/vikingeducation/project_danebook/pulls/37/commits","review_comments_url":"https://api.github.com/repos/vikingeducation/project_danebook/pulls/37/comments","review_comment_url":"https://api.github.com/repos/vikingeducation/project_danebook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vikingeducation/project_danebook/issues/37/comments","statuses_url":"https://api.github.com/repos/vikingeducation/project_danebook/statuses/7b5a0deed1dae95c53fda44dd8cdea5dedfcf6b0","head":{"label":"morgancmartin:master","ref":"master","sha":"7b5a0deed1dae95c53fda44dd8cdea5dedfcf6b0","user":{"login":"morgancmartin","id":4595149,"avatar_url":"https://avatars.githubusercontent.com/u/4595149?v=3","gravatar_id":"","url":"https://api.github.com/users/morgancmartin","html_url":"https://github.com/morgancmartin","followers_url":"https://api.github.com/users/morgancmartin/followers","following_url":"https://api.github.com/users/morgancmartin/following{/other_user}","gists_url":"https://api.github.com/users/morgancmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/morgancmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morgancmartin/subscriptions","organizations_url":"https://api.github.com/users/morgancmartin/orgs","repos_url":"https://api.github.com/users/morgancmartin/repos","events_url":"https://api.github.com/users/morgancmartin/events{/privacy}","received_events_url":"https://api.github.com/users/morgancmartin/received_events","type":"User","site_admin":false},"repo":{"id":65504708,"name":"project_danebook","full_name":"morgancmartin/project_danebook","owner":{"login":"morgancmartin","id":4595149,"avatar_url":"https://avatars.githubusercontent.com/u/4595149?v=3","gravatar_id":"","url":"https://api.github.com/users/morgancmartin","html_url":"https://github.com/morgancmartin","followers_url":"https://api.github.com/users/morgancmartin/followers","following_url":"https://api.github.com/users/morgancmartin/following{/other_user}","gists_url":"https://api.github.com/users/morgancmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/morgancmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morgancmartin/subscriptions","organizations_url":"https://api.github.com/users/morgancmartin/orgs","repos_url":"https://api.github.com/users/morgancmartin/repos","events_url":"https://api.github.com/users/morgancmartin/events{/privacy}","received_events_url":"https://api.github.com/users/morgancmartin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/morgancmartin/project_danebook","description":"This is the Real Dane Deal.","fork":true,"url":"https://api.github.com/repos/morgancmartin/project_danebook","forks_url":"https://api.github.com/repos/morgancmartin/project_danebook/forks","keys_url":"https://api.github.com/repos/morgancmartin/project_danebook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/morgancmartin/project_danebook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/morgancmartin/project_danebook/teams","hooks_url":"https://api.github.com/repos/morgancmartin/project_danebook/hooks","issue_events_url":"https://api.github.com/repos/morgancmartin/project_danebook/issues/events{/number}","events_url":"https://api.github.com/repos/morgancmartin/project_danebook/events","assignees_url":"https://api.github.com/repos/morgancmartin/project_danebook/assignees{/user}","branches_url":"https://api.github.com/repos/morgancmartin/project_danebook/branches{/branch}","tags_url":"https://api.github.com/repos/morgancmartin/project_danebook/tags","blobs_url":"https://api.github.com/repos/morgancmartin/project_danebook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/morgancmartin/project_danebook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/morgancmartin/project_danebook/git/refs{/sha}","trees_url":"https://api.github.com/repos/morgancmartin/project_danebook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/morgancmartin/project_danebook/statuses/{sha}","languages_url":"https://api.github.com/repos/morgancmartin/project_danebook/languages","stargazers_url":"https://api.github.com/repos/morgancmartin/project_danebook/stargazers","contributors_url":"https://api.github.com/repos/morgancmartin/project_danebook/contributors","subscribers_url":"https://api.github.com/repos/morgancmartin/project_danebook/subscribers","subscription_url":"https://api.github.com/repos/morgancmartin/project_danebook/subscription","commits_url":"https://api.github.com/repos/morgancmartin/project_danebook/commits{/sha}","git_commits_url":"https://api.github.com/repos/morgancmartin/project_danebook/git/commits{/sha}","comments_url":"https://api.github.com/repos/morgancmartin/project_danebook/comments{/number}","issue_comment_url":"https://api.github.com/repos/morgancmartin/project_danebook/issues/comments{/number}","contents_url":"https://api.github.com/repos/morgancmartin/project_danebook/contents/{+path}","compare_url":"https://api.github.com/repos/morgancmartin/project_danebook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/morgancmartin/project_danebook/merges","archive_url":"https://api.github.com/repos/morgancmartin/project_danebook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/morgancmartin/project_danebook/downloads","issues_url":"https://api.github.com/repos/morgancmartin/project_danebook/issues{/number}","pulls_url":"https://api.github.com/repos/morgancmartin/project_danebook/pulls{/number}","milestones_url":"https://api.github.com/repos/morgancmartin/project_danebook/milestones{/number}","notifications_url":"https://api.github.com/repos/morgancmartin/project_danebook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/morgancmartin/project_danebook/labels{/name}","releases_url":"https://api.github.com/repos/morgancmartin/project_danebook/releases{/id}","deployments_url":"https://api.github.com/repos/morgancmartin/project_danebook/deployments","created_at":"2016-08-11T22:08:16Z","updated_at":"2016-08-12T19:31:43Z","pushed_at":"2016-08-22T23:16:37Z","git_url":"git://github.com/morgancmartin/project_danebook.git","ssh_url":"git@github.com:morgancmartin/project_danebook.git","clone_url":"https://github.com/morgancmartin/project_danebook.git","svn_url":"https://github.com/morgancmartin/project_danebook","homepage":null,"size":7566,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"vikingeducation:master","ref":"master","sha":"5d92a86445ce8cb1e62f1a14b9d019bbeaa2e2f0","user":{"login":"vikingeducation","id":7231832,"avatar_url":"https://avatars.githubusercontent.com/u/7231832?v=3","gravatar_id":"","url":"https://api.github.com/users/vikingeducation","html_url":"https://github.com/vikingeducation","followers_url":"https://api.github.com/users/vikingeducation/followers","following_url":"https://api.github.com/users/vikingeducation/following{/other_user}","gists_url":"https://api.github.com/users/vikingeducation/gists{/gist_id}","starred_url":"https://api.github.com/users/vikingeducation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikingeducation/subscriptions","organizations_url":"https://api.github.com/users/vikingeducation/orgs","repos_url":"https://api.github.com/users/vikingeducation/repos","events_url":"https://api.github.com/users/vikingeducation/events{/privacy}","received_events_url":"https://api.github.com/users/vikingeducation/received_events","type":"Organization","site_admin":false},"repo":{"id":25442463,"name":"project_danebook","full_name":"vikingeducation/project_danebook","owner":{"login":"vikingeducation","id":7231832,"avatar_url":"https://avatars.githubusercontent.com/u/7231832?v=3","gravatar_id":"","url":"https://api.github.com/users/vikingeducation","html_url":"https://github.com/vikingeducation","followers_url":"https://api.github.com/users/vikingeducation/followers","following_url":"https://api.github.com/users/vikingeducation/following{/other_user}","gists_url":"https://api.github.com/users/vikingeducation/gists{/gist_id}","starred_url":"https://api.github.com/users/vikingeducation/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikingeducation/subscriptions","organizations_url":"https://api.github.com/users/vikingeducation/orgs","repos_url":"https://api.github.com/users/vikingeducation/repos","events_url":"https://api.github.com/users/vikingeducation/events{/privacy}","received_events_url":"https://api.github.com/users/vikingeducation/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/vikingeducation/project_danebook","description":"This is the Real Dane Deal.","fork":false,"url":"https://api.github.com/repos/vikingeducation/project_danebook","forks_url":"https://api.github.com/repos/vikingeducation/project_danebook/forks","keys_url":"https://api.github.com/repos/vikingeducation/project_danebook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vikingeducation/project_danebook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vikingeducation/project_danebook/teams","hooks_url":"https://api.github.com/repos/vikingeducation/project_danebook/hooks","issue_events_url":"https://api.github.com/repos/vikingeducation/project_danebook/issues/events{/number}","events_url":"https://api.github.com/repos/vikingeducation/project_danebook/events","assignees_url":"https://api.github.com/repos/vikingeducation/project_danebook/assignees{/user}","branches_url":"https://api.github.com/repos/vikingeducation/project_danebook/branches{/branch}","tags_url":"https://api.github.com/repos/vikingeducation/project_danebook/tags","blobs_url":"https://api.github.com/repos/vikingeducation/project_danebook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vikingeducation/project_danebook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vikingeducation/project_danebook/git/refs{/sha}","trees_url":"https://api.github.com/repos/vikingeducation/project_danebook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vikingeducation/project_danebook/statuses/{sha}","languages_url":"https://api.github.com/repos/vikingeducation/project_danebook/languages","stargazers_url":"https://api.github.com/repos/vikingeducation/project_danebook/stargazers","contributors_url":"https://api.github.com/repos/vikingeducation/project_danebook/contributors","subscribers_url":"https://api.github.com/repos/vikingeducation/project_danebook/subscribers","subscription_url":"https://api.github.com/repos/vikingeducation/project_danebook/subscription","commits_url":"https://api.github.com/repos/vikingeducation/project_danebook/commits{/sha}","git_commits_url":"https://api.github.com/repos/vikingeducation/project_danebook/git/commits{/sha}","comments_url":"https://api.github.com/repos/vikingeducation/project_danebook/comments{/number}","issue_comment_url":"https://api.github.com/repos/vikingeducation/project_danebook/issues/comments{/number}","contents_url":"https://api.github.com/repos/vikingeducation/project_danebook/contents/{+path}","compare_url":"https://api.github.com/repos/vikingeducation/project_danebook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vikingeducation/project_danebook/merges","archive_url":"https://api.github.com/repos/vikingeducation/project_danebook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vikingeducation/project_danebook/downloads","issues_url":"https://api.github.com/repos/vikingeducation/project_danebook/issues{/number}","pulls_url":"https://api.github.com/repos/vikingeducation/project_danebook/pulls{/number}","milestones_url":"https://api.github.com/repos/vikingeducation/project_danebook/milestones{/number}","notifications_url":"https://api.github.com/repos/vikingeducation/project_danebook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vikingeducation/project_danebook/labels{/name}","releases_url":"https://api.github.com/repos/vikingeducation/project_danebook/releases{/id}","deployments_url":"https://api.github.com/repos/vikingeducation/project_danebook/deployments","created_at":"2014-10-19T22:43:28Z","updated_at":"2016-06-21T15:57:55Z","pushed_at":"2016-08-22T23:45:43Z","git_url":"git://github.com/vikingeducation/project_danebook.git","ssh_url":"git@github.com:vikingeducation/project_danebook.git","clone_url":"https://github.com/vikingeducation/project_danebook.git","svn_url":"https://github.com/vikingeducation/project_danebook","homepage":null,"size":29224,"stargazers_count":1,"watchers_count":1,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":49,"mirror_url":null,"open_issues_count":43,"forks":49,"open_issues":43,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vikingeducation/project_danebook/pulls/37"},"html":{"href":"https://github.com/vikingeducation/project_danebook/pull/37"},"issue":{"href":"https://api.github.com/repos/vikingeducation/project_danebook/issues/37"},"comments":{"href":"https://api.github.com/repos/vikingeducation/project_danebook/issues/37/comments"},"review_comments":{"href":"https://api.github.com/repos/vikingeducation/project_danebook/pulls/37/comments"},"review_comment":{"href":"https://api.github.com/repos/vikingeducation/project_danebook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vikingeducation/project_danebook/pulls/37/commits"},"statuses":{"href":"https://api.github.com/repos/vikingeducation/project_danebook/statuses/7b5a0deed1dae95c53fda44dd8cdea5dedfcf6b0"}}}}
{"actor":{"display_login":"adrianmui"}}