{"action":"created","comment":{"url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/pulls/comments/25612951","id":25612951,"diff_hunk":"@@ -0,0 +1,62 @@\n+class CommentsController < ApplicationController\n+\n+  def new\n+    @answer = Answer.find(params[:answer_id])\n+    question = Question.find(params[:question_id])\n+    if current_user\n+      @comment = Comment.new(answer: @answer)\n+    else\n+      flash[:notice] = \"You Mustache Login To Do That\"\n+      redirect_to question_path(question)\n+    end\n+  end\n+\n+  def create\n+    answer = Answer.find(params[:answer_id])\n+    if make_sure_that_user_logged_in\n+      #add comment\n+      user = current_user\n+      params[:comment][:user_id] = user.id\n+      comment = Comment.create(comment_params())\n+      answer.comments.push(comment)\n+    end\n+    redirect_to question_path(answer.question)\n+  end\n+\n+  def show","path":"app/controllers/comments_controller.rb","position":26,"original_position":26,"commit_id":"785986ae7cc18175ae4fb61287dc97fb8565b0c0","original_commit_id":"785986ae7cc18175ae4fb61287dc97fb8565b0c0","user":{"login":"stevecass","id":1823156,"avatar_url":"https://avatars.githubusercontent.com/u/1823156?v=3","gravatar_id":"","url":"https://api.github.com/users/stevecass","html_url":"https://github.com/stevecass","followers_url":"https://api.github.com/users/stevecass/followers","following_url":"https://api.github.com/users/stevecass/following{/other_user}","gists_url":"https://api.github.com/users/stevecass/gists{/gist_id}","starred_url":"https://api.github.com/users/stevecass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevecass/subscriptions","organizations_url":"https://api.github.com/users/stevecass/orgs","repos_url":"https://api.github.com/users/stevecass/repos","events_url":"https://api.github.com/users/stevecass/events{/privacy}","received_events_url":"https://api.github.com/users/stevecass/received_events","type":"User","site_admin":false},"body":"You don't need to implement empty actions - rails will just render the view for them even if absent (as long as a route maps to them.)","created_at":"2015-03-02T16:39:13Z","updated_at":"2015-03-02T16:39:13Z","html_url":"https://github.com/melissawimberly/MustacheYouAQuestion/pull/29#discussion_r25612951","pull_request_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/pulls/comments/25612951"},"html":{"href":"https://github.com/melissawimberly/MustacheYouAQuestion/pull/29#discussion_r25612951"},"pull_request":{"href":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/pulls/29","id":30295599,"html_url":"https://github.com/melissawimberly/MustacheYouAQuestion/pull/29","diff_url":"https://github.com/melissawimberly/MustacheYouAQuestion/pull/29.diff","patch_url":"https://github.com/melissawimberly/MustacheYouAQuestion/pull/29.patch","issue_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/issues/29","number":29,"state":"open","locked":false,"title":"Review - don't merge","user":{"login":"stevecass","id":1823156,"avatar_url":"https://avatars.githubusercontent.com/u/1823156?v=3","gravatar_id":"","url":"https://api.github.com/users/stevecass","html_url":"https://github.com/stevecass","followers_url":"https://api.github.com/users/stevecass/followers","following_url":"https://api.github.com/users/stevecass/following{/other_user}","gists_url":"https://api.github.com/users/stevecass/gists{/gist_id}","starred_url":"https://api.github.com/users/stevecass/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevecass/subscriptions","organizations_url":"https://api.github.com/users/stevecass/orgs","repos_url":"https://api.github.com/users/stevecass/repos","events_url":"https://api.github.com/users/stevecass/events{/privacy}","received_events_url":"https://api.github.com/users/stevecass/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-02T16:10:09Z","updated_at":"2015-03-02T16:39:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"266209313515b315f5b6380bfc07a2366fefba27","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/pulls/29/commits","review_comments_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/pulls/29/comments","review_comment_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/pulls/comments{/number}","comments_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/issues/29/comments","statuses_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/statuses/785986ae7cc18175ae4fb61287dc97fb8565b0c0","head":{"label":"melissawimberly:review","ref":"review","sha":"785986ae7cc18175ae4fb61287dc97fb8565b0c0","user":{"login":"melissawimberly","id":8838918,"avatar_url":"https://avatars.githubusercontent.com/u/8838918?v=3","gravatar_id":"","url":"https://api.github.com/users/melissawimberly","html_url":"https://github.com/melissawimberly","followers_url":"https://api.github.com/users/melissawimberly/followers","following_url":"https://api.github.com/users/melissawimberly/following{/other_user}","gists_url":"https://api.github.com/users/melissawimberly/gists{/gist_id}","starred_url":"https://api.github.com/users/melissawimberly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melissawimberly/subscriptions","organizations_url":"https://api.github.com/users/melissawimberly/orgs","repos_url":"https://api.github.com/users/melissawimberly/repos","events_url":"https://api.github.com/users/melissawimberly/events{/privacy}","received_events_url":"https://api.github.com/users/melissawimberly/received_events","type":"User","site_admin":false},"repo":{"id":31392331,"name":"MustacheYouAQuestion","full_name":"melissawimberly/MustacheYouAQuestion","owner":{"login":"melissawimberly","id":8838918,"avatar_url":"https://avatars.githubusercontent.com/u/8838918?v=3","gravatar_id":"","url":"https://api.github.com/users/melissawimberly","html_url":"https://github.com/melissawimberly","followers_url":"https://api.github.com/users/melissawimberly/followers","following_url":"https://api.github.com/users/melissawimberly/following{/other_user}","gists_url":"https://api.github.com/users/melissawimberly/gists{/gist_id}","starred_url":"https://api.github.com/users/melissawimberly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melissawimberly/subscriptions","organizations_url":"https://api.github.com/users/melissawimberly/orgs","repos_url":"https://api.github.com/users/melissawimberly/repos","events_url":"https://api.github.com/users/melissawimberly/events{/privacy}","received_events_url":"https://api.github.com/users/melissawimberly/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/melissawimberly/MustacheYouAQuestion","description":"","fork":false,"url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion","forks_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/forks","keys_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/teams","hooks_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/hooks","issue_events_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/issues/events{/number}","events_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/events","assignees_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/assignees{/user}","branches_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/branches{/branch}","tags_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/tags","blobs_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/git/refs{/sha}","trees_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/statuses/{sha}","languages_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/languages","stargazers_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/stargazers","contributors_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/contributors","subscribers_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/subscribers","subscription_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/subscription","commits_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/commits{/sha}","git_commits_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/git/commits{/sha}","comments_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/comments{/number}","issue_comment_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/issues/comments{/number}","contents_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/contents/{+path}","compare_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/merges","archive_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/downloads","issues_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/issues{/number}","pulls_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/pulls{/number}","milestones_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/milestones{/number}","notifications_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/labels{/name}","releases_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/releases{/id}","created_at":"2015-02-26T22:32:08Z","updated_at":"2015-03-02T13:53:32Z","pushed_at":"2015-03-02T16:09:41Z","git_url":"git://github.com/melissawimberly/MustacheYouAQuestion.git","ssh_url":"git@github.com:melissawimberly/MustacheYouAQuestion.git","clone_url":"https://github.com/melissawimberly/MustacheYouAQuestion.git","svn_url":"https://github.com/melissawimberly/MustacheYouAQuestion","homepage":null,"size":484,"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":"melissawimberly:review_base","ref":"review_base","sha":"6421b34f0f1bdc42a43722cc9e3ffe5b29fd988e","user":{"login":"melissawimberly","id":8838918,"avatar_url":"https://avatars.githubusercontent.com/u/8838918?v=3","gravatar_id":"","url":"https://api.github.com/users/melissawimberly","html_url":"https://github.com/melissawimberly","followers_url":"https://api.github.com/users/melissawimberly/followers","following_url":"https://api.github.com/users/melissawimberly/following{/other_user}","gists_url":"https://api.github.com/users/melissawimberly/gists{/gist_id}","starred_url":"https://api.github.com/users/melissawimberly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melissawimberly/subscriptions","organizations_url":"https://api.github.com/users/melissawimberly/orgs","repos_url":"https://api.github.com/users/melissawimberly/repos","events_url":"https://api.github.com/users/melissawimberly/events{/privacy}","received_events_url":"https://api.github.com/users/melissawimberly/received_events","type":"User","site_admin":false},"repo":{"id":31392331,"name":"MustacheYouAQuestion","full_name":"melissawimberly/MustacheYouAQuestion","owner":{"login":"melissawimberly","id":8838918,"avatar_url":"https://avatars.githubusercontent.com/u/8838918?v=3","gravatar_id":"","url":"https://api.github.com/users/melissawimberly","html_url":"https://github.com/melissawimberly","followers_url":"https://api.github.com/users/melissawimberly/followers","following_url":"https://api.github.com/users/melissawimberly/following{/other_user}","gists_url":"https://api.github.com/users/melissawimberly/gists{/gist_id}","starred_url":"https://api.github.com/users/melissawimberly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/melissawimberly/subscriptions","organizations_url":"https://api.github.com/users/melissawimberly/orgs","repos_url":"https://api.github.com/users/melissawimberly/repos","events_url":"https://api.github.com/users/melissawimberly/events{/privacy}","received_events_url":"https://api.github.com/users/melissawimberly/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/melissawimberly/MustacheYouAQuestion","description":"","fork":false,"url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion","forks_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/forks","keys_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/teams","hooks_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/hooks","issue_events_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/issues/events{/number}","events_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/events","assignees_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/assignees{/user}","branches_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/branches{/branch}","tags_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/tags","blobs_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/git/refs{/sha}","trees_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/statuses/{sha}","languages_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/languages","stargazers_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/stargazers","contributors_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/contributors","subscribers_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/subscribers","subscription_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/subscription","commits_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/commits{/sha}","git_commits_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/git/commits{/sha}","comments_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/comments{/number}","issue_comment_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/issues/comments{/number}","contents_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/contents/{+path}","compare_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/merges","archive_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/downloads","issues_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/issues{/number}","pulls_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/pulls{/number}","milestones_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/milestones{/number}","notifications_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/labels{/name}","releases_url":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/releases{/id}","created_at":"2015-02-26T22:32:08Z","updated_at":"2015-03-02T13:53:32Z","pushed_at":"2015-03-02T16:09:41Z","git_url":"git://github.com/melissawimberly/MustacheYouAQuestion.git","ssh_url":"git@github.com:melissawimberly/MustacheYouAQuestion.git","clone_url":"https://github.com/melissawimberly/MustacheYouAQuestion.git","svn_url":"https://github.com/melissawimberly/MustacheYouAQuestion","homepage":null,"size":484,"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/melissawimberly/MustacheYouAQuestion/pulls/29"},"html":{"href":"https://github.com/melissawimberly/MustacheYouAQuestion/pull/29"},"issue":{"href":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/issues/29"},"comments":{"href":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/melissawimberly/MustacheYouAQuestion/statuses/785986ae7cc18175ae4fb61287dc97fb8565b0c0"}}}}