{"action":"created","comment":{"url":"https://api.github.com/repos/IDFSimpson/blog/pulls/comments/64464200","id":64464200,"diff_hunk":"@@ -0,0 +1,70 @@\n+class CommentsController < ApplicationController\n+\n+  before_action :authenticate_user!\n+  before_action(:find_comment, {only: [:show, :edit, :update, :destroy]})\n+  before_action :authorize_comment, only: [:edit, :update, :destroy]\n+\n+\n+  def index\n+    @comments = Comment.all\n+  end\n+\n+  def new\n+    @comment = Comment.new\n+  end\n+\n+  def create\n+    @post = Post.find params[:post_id]\n+    @comment = Comment.new(comment_params)\n+    @comment.post = @post\n+    @comment.user = current_user\n+    respond_to do |format|\n+      if @comment.save\n+        flash[:notice] = \"Comment Created\"\n+        format.html { redirect_to post_path(@post) }\n+        format.js   { render :reload }\n+      else\n+        flash[:alert] = \"Error! Comment not created\"\n+        format.html { render \"/posts/show\" }\n+        format.js   { render :reload }\n+      end\n+    end\n+  end\n+\n+  def edit\n+  end\n+\n+  # def update","path":"app/controllers/comments_controller.rb","position":37,"original_position":37,"commit_id":"a09af4327fc7e0da1f42e214437dc50799439cd9","original_commit_id":"a09af4327fc7e0da1f42e214437dc50799439cd9","user":{"login":"yiivan","id":17835966,"avatar_url":"https://avatars.githubusercontent.com/u/17835966?v=3","gravatar_id":"","url":"https://api.github.com/users/yiivan","html_url":"https://github.com/yiivan","followers_url":"https://api.github.com/users/yiivan/followers","following_url":"https://api.github.com/users/yiivan/following{/other_user}","gists_url":"https://api.github.com/users/yiivan/gists{/gist_id}","starred_url":"https://api.github.com/users/yiivan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yiivan/subscriptions","organizations_url":"https://api.github.com/users/yiivan/orgs","repos_url":"https://api.github.com/users/yiivan/repos","events_url":"https://api.github.com/users/yiivan/events{/privacy}","received_events_url":"https://api.github.com/users/yiivan/received_events","type":"User","site_admin":false},"body":"What happened to the commented out update action?","created_at":"2016-05-24T20:05:35Z","updated_at":"2016-05-24T20:05:35Z","html_url":"https://github.com/IDFSimpson/blog/pull/1#discussion_r64464200","pull_request_url":"https://api.github.com/repos/IDFSimpson/blog/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/IDFSimpson/blog/pulls/comments/64464200"},"html":{"href":"https://github.com/IDFSimpson/blog/pull/1#discussion_r64464200"},"pull_request":{"href":"https://api.github.com/repos/IDFSimpson/blog/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/IDFSimpson/blog/pulls/1","id":70931800,"html_url":"https://github.com/IDFSimpson/blog/pull/1","diff_url":"https://github.com/IDFSimpson/blog/pull/1.diff","patch_url":"https://github.com/IDFSimpson/blog/pull/1.patch","issue_url":"https://api.github.com/repos/IDFSimpson/blog/issues/1","number":1,"state":"open","locked":false,"title":"Integration","user":{"login":"IDFSimpson","id":17833158,"avatar_url":"https://avatars.githubusercontent.com/u/17833158?v=3","gravatar_id":"","url":"https://api.github.com/users/IDFSimpson","html_url":"https://github.com/IDFSimpson","followers_url":"https://api.github.com/users/IDFSimpson/followers","following_url":"https://api.github.com/users/IDFSimpson/following{/other_user}","gists_url":"https://api.github.com/users/IDFSimpson/gists{/gist_id}","starred_url":"https://api.github.com/users/IDFSimpson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IDFSimpson/subscriptions","organizations_url":"https://api.github.com/users/IDFSimpson/orgs","repos_url":"https://api.github.com/users/IDFSimpson/repos","events_url":"https://api.github.com/users/IDFSimpson/events{/privacy}","received_events_url":"https://api.github.com/users/IDFSimpson/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-05-20T23:54:46Z","updated_at":"2016-05-24T20:05:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"39aeb40e3e6a507eb2661de0c0272b6ca421feba","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/IDFSimpson/blog/pulls/1/commits","review_comments_url":"https://api.github.com/repos/IDFSimpson/blog/pulls/1/comments","review_comment_url":"https://api.github.com/repos/IDFSimpson/blog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/IDFSimpson/blog/issues/1/comments","statuses_url":"https://api.github.com/repos/IDFSimpson/blog/statuses/a09af4327fc7e0da1f42e214437dc50799439cd9","head":{"label":"IDFSimpson:integration","ref":"integration","sha":"a09af4327fc7e0da1f42e214437dc50799439cd9","user":{"login":"IDFSimpson","id":17833158,"avatar_url":"https://avatars.githubusercontent.com/u/17833158?v=3","gravatar_id":"","url":"https://api.github.com/users/IDFSimpson","html_url":"https://github.com/IDFSimpson","followers_url":"https://api.github.com/users/IDFSimpson/followers","following_url":"https://api.github.com/users/IDFSimpson/following{/other_user}","gists_url":"https://api.github.com/users/IDFSimpson/gists{/gist_id}","starred_url":"https://api.github.com/users/IDFSimpson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IDFSimpson/subscriptions","organizations_url":"https://api.github.com/users/IDFSimpson/orgs","repos_url":"https://api.github.com/users/IDFSimpson/repos","events_url":"https://api.github.com/users/IDFSimpson/events{/privacy}","received_events_url":"https://api.github.com/users/IDFSimpson/received_events","type":"User","site_admin":false},"repo":{"id":55667889,"name":"blog","full_name":"IDFSimpson/blog","owner":{"login":"IDFSimpson","id":17833158,"avatar_url":"https://avatars.githubusercontent.com/u/17833158?v=3","gravatar_id":"","url":"https://api.github.com/users/IDFSimpson","html_url":"https://github.com/IDFSimpson","followers_url":"https://api.github.com/users/IDFSimpson/followers","following_url":"https://api.github.com/users/IDFSimpson/following{/other_user}","gists_url":"https://api.github.com/users/IDFSimpson/gists{/gist_id}","starred_url":"https://api.github.com/users/IDFSimpson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IDFSimpson/subscriptions","organizations_url":"https://api.github.com/users/IDFSimpson/orgs","repos_url":"https://api.github.com/users/IDFSimpson/repos","events_url":"https://api.github.com/users/IDFSimpson/events{/privacy}","received_events_url":"https://api.github.com/users/IDFSimpson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/IDFSimpson/blog","description":"","fork":false,"url":"https://api.github.com/repos/IDFSimpson/blog","forks_url":"https://api.github.com/repos/IDFSimpson/blog/forks","keys_url":"https://api.github.com/repos/IDFSimpson/blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IDFSimpson/blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IDFSimpson/blog/teams","hooks_url":"https://api.github.com/repos/IDFSimpson/blog/hooks","issue_events_url":"https://api.github.com/repos/IDFSimpson/blog/issues/events{/number}","events_url":"https://api.github.com/repos/IDFSimpson/blog/events","assignees_url":"https://api.github.com/repos/IDFSimpson/blog/assignees{/user}","branches_url":"https://api.github.com/repos/IDFSimpson/blog/branches{/branch}","tags_url":"https://api.github.com/repos/IDFSimpson/blog/tags","blobs_url":"https://api.github.com/repos/IDFSimpson/blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IDFSimpson/blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IDFSimpson/blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/IDFSimpson/blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IDFSimpson/blog/statuses/{sha}","languages_url":"https://api.github.com/repos/IDFSimpson/blog/languages","stargazers_url":"https://api.github.com/repos/IDFSimpson/blog/stargazers","contributors_url":"https://api.github.com/repos/IDFSimpson/blog/contributors","subscribers_url":"https://api.github.com/repos/IDFSimpson/blog/subscribers","subscription_url":"https://api.github.com/repos/IDFSimpson/blog/subscription","commits_url":"https://api.github.com/repos/IDFSimpson/blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/IDFSimpson/blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/IDFSimpson/blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/IDFSimpson/blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/IDFSimpson/blog/contents/{+path}","compare_url":"https://api.github.com/repos/IDFSimpson/blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IDFSimpson/blog/merges","archive_url":"https://api.github.com/repos/IDFSimpson/blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IDFSimpson/blog/downloads","issues_url":"https://api.github.com/repos/IDFSimpson/blog/issues{/number}","pulls_url":"https://api.github.com/repos/IDFSimpson/blog/pulls{/number}","milestones_url":"https://api.github.com/repos/IDFSimpson/blog/milestones{/number}","notifications_url":"https://api.github.com/repos/IDFSimpson/blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IDFSimpson/blog/labels{/name}","releases_url":"https://api.github.com/repos/IDFSimpson/blog/releases{/id}","deployments_url":"https://api.github.com/repos/IDFSimpson/blog/deployments","created_at":"2016-04-07T06:02:59Z","updated_at":"2016-04-07T06:03:59Z","pushed_at":"2016-05-20T23:54:46Z","git_url":"git://github.com/IDFSimpson/blog.git","ssh_url":"git@github.com:IDFSimpson/blog.git","clone_url":"https://github.com/IDFSimpson/blog.git","svn_url":"https://github.com/IDFSimpson/blog","homepage":null,"size":87,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"IDFSimpson:master","ref":"master","sha":"0b7235f52426441a5fe7348f839dbe5702b9b5ec","user":{"login":"IDFSimpson","id":17833158,"avatar_url":"https://avatars.githubusercontent.com/u/17833158?v=3","gravatar_id":"","url":"https://api.github.com/users/IDFSimpson","html_url":"https://github.com/IDFSimpson","followers_url":"https://api.github.com/users/IDFSimpson/followers","following_url":"https://api.github.com/users/IDFSimpson/following{/other_user}","gists_url":"https://api.github.com/users/IDFSimpson/gists{/gist_id}","starred_url":"https://api.github.com/users/IDFSimpson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IDFSimpson/subscriptions","organizations_url":"https://api.github.com/users/IDFSimpson/orgs","repos_url":"https://api.github.com/users/IDFSimpson/repos","events_url":"https://api.github.com/users/IDFSimpson/events{/privacy}","received_events_url":"https://api.github.com/users/IDFSimpson/received_events","type":"User","site_admin":false},"repo":{"id":55667889,"name":"blog","full_name":"IDFSimpson/blog","owner":{"login":"IDFSimpson","id":17833158,"avatar_url":"https://avatars.githubusercontent.com/u/17833158?v=3","gravatar_id":"","url":"https://api.github.com/users/IDFSimpson","html_url":"https://github.com/IDFSimpson","followers_url":"https://api.github.com/users/IDFSimpson/followers","following_url":"https://api.github.com/users/IDFSimpson/following{/other_user}","gists_url":"https://api.github.com/users/IDFSimpson/gists{/gist_id}","starred_url":"https://api.github.com/users/IDFSimpson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IDFSimpson/subscriptions","organizations_url":"https://api.github.com/users/IDFSimpson/orgs","repos_url":"https://api.github.com/users/IDFSimpson/repos","events_url":"https://api.github.com/users/IDFSimpson/events{/privacy}","received_events_url":"https://api.github.com/users/IDFSimpson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/IDFSimpson/blog","description":"","fork":false,"url":"https://api.github.com/repos/IDFSimpson/blog","forks_url":"https://api.github.com/repos/IDFSimpson/blog/forks","keys_url":"https://api.github.com/repos/IDFSimpson/blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IDFSimpson/blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IDFSimpson/blog/teams","hooks_url":"https://api.github.com/repos/IDFSimpson/blog/hooks","issue_events_url":"https://api.github.com/repos/IDFSimpson/blog/issues/events{/number}","events_url":"https://api.github.com/repos/IDFSimpson/blog/events","assignees_url":"https://api.github.com/repos/IDFSimpson/blog/assignees{/user}","branches_url":"https://api.github.com/repos/IDFSimpson/blog/branches{/branch}","tags_url":"https://api.github.com/repos/IDFSimpson/blog/tags","blobs_url":"https://api.github.com/repos/IDFSimpson/blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IDFSimpson/blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IDFSimpson/blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/IDFSimpson/blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IDFSimpson/blog/statuses/{sha}","languages_url":"https://api.github.com/repos/IDFSimpson/blog/languages","stargazers_url":"https://api.github.com/repos/IDFSimpson/blog/stargazers","contributors_url":"https://api.github.com/repos/IDFSimpson/blog/contributors","subscribers_url":"https://api.github.com/repos/IDFSimpson/blog/subscribers","subscription_url":"https://api.github.com/repos/IDFSimpson/blog/subscription","commits_url":"https://api.github.com/repos/IDFSimpson/blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/IDFSimpson/blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/IDFSimpson/blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/IDFSimpson/blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/IDFSimpson/blog/contents/{+path}","compare_url":"https://api.github.com/repos/IDFSimpson/blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IDFSimpson/blog/merges","archive_url":"https://api.github.com/repos/IDFSimpson/blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IDFSimpson/blog/downloads","issues_url":"https://api.github.com/repos/IDFSimpson/blog/issues{/number}","pulls_url":"https://api.github.com/repos/IDFSimpson/blog/pulls{/number}","milestones_url":"https://api.github.com/repos/IDFSimpson/blog/milestones{/number}","notifications_url":"https://api.github.com/repos/IDFSimpson/blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IDFSimpson/blog/labels{/name}","releases_url":"https://api.github.com/repos/IDFSimpson/blog/releases{/id}","deployments_url":"https://api.github.com/repos/IDFSimpson/blog/deployments","created_at":"2016-04-07T06:02:59Z","updated_at":"2016-04-07T06:03:59Z","pushed_at":"2016-05-20T23:54:46Z","git_url":"git://github.com/IDFSimpson/blog.git","ssh_url":"git@github.com:IDFSimpson/blog.git","clone_url":"https://github.com/IDFSimpson/blog.git","svn_url":"https://github.com/IDFSimpson/blog","homepage":null,"size":87,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/IDFSimpson/blog/pulls/1"},"html":{"href":"https://github.com/IDFSimpson/blog/pull/1"},"issue":{"href":"https://api.github.com/repos/IDFSimpson/blog/issues/1"},"comments":{"href":"https://api.github.com/repos/IDFSimpson/blog/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/IDFSimpson/blog/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/IDFSimpson/blog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/IDFSimpson/blog/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/IDFSimpson/blog/statuses/a09af4327fc7e0da1f42e214437dc50799439cd9"}}}}
{"actor":{"display_login":"yiivan"}}