{"action":"created","comment":{"url":"https://api.github.com/repos/DuncanRose/CookR/pulls/comments/28471927","id":28471927,"diff_hunk":"@@ -0,0 +1,60 @@\n+class ReviewsController < ApplicationController\n+  before_action :authenticate_user!, only: [:create, :update, :destroy]\n+  before_action :find_recipe, only: [:new, :create, :update, :destroy, :edit]\n+  before_action :find_review, only: [:update, :edit]\n+\n+  def edit\n+  end\n+\n+  def new\n+    @review = Review.new\n+  end\n+\n+  def create\n+    @review = Review.new(review_params)\n+    @review.recipe = @recipe\n+    @review.user = current_user\n+\n+    if @review.save\n+      flash[:notice] = 'Comment Successfully Created'\n+      redirect_to recipe_path(@recipe)\n+    else\n+      @review.errors.full_messages.each { |message| flash[:errors] = message }\n+      render recipe_path(@recipe)\n+    end\n+  end\n+\n+  def update\n+    @review.recipe = @recipe\n+\n+    if @review.update(review_params)\n+      redirect_to recipe_path(@recipe)\n+    else\n+      @review.errors.full_messages.each { |message| flash[:errors] = message }\n+      render recipe_path(@recipe)\n+    end\n+  end\n+\n+  def destroy\n+    if Review.delete(params[:id])\n+      flash[:notice] = 'Comment deleted'\n+    else\n+      flash[:alert] = 'Comment Failed to Delete'","path":"app/controllers/reviews_controller.rb","position":42,"original_position":42,"commit_id":"5a06d49c52939105b82fbeca79760037375b267f","original_commit_id":"5a06d49c52939105b82fbeca79760037375b267f","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2015-04-15T23:07:22Z","updated_at":"2015-04-15T23:07:22Z","html_url":"https://github.com/DuncanRose/CookR/pull/2#discussion_r28471927","pull_request_url":"https://api.github.com/repos/DuncanRose/CookR/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/DuncanRose/CookR/pulls/comments/28471927"},"html":{"href":"https://github.com/DuncanRose/CookR/pull/2#discussion_r28471927"},"pull_request":{"href":"https://api.github.com/repos/DuncanRose/CookR/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/DuncanRose/CookR/pulls/2","id":33405352,"html_url":"https://github.com/DuncanRose/CookR/pull/2","diff_url":"https://github.com/DuncanRose/CookR/pull/2.diff","patch_url":"https://github.com/DuncanRose/CookR/pull/2.patch","issue_url":"https://api.github.com/repos/DuncanRose/CookR/issues/2","number":2,"state":"open","locked":false,"title":"Reviews CRUD and Tests","user":{"login":"DuncanRose","id":9580892,"avatar_url":"https://avatars.githubusercontent.com/u/9580892?v=3","gravatar_id":"","url":"https://api.github.com/users/DuncanRose","html_url":"https://github.com/DuncanRose","followers_url":"https://api.github.com/users/DuncanRose/followers","following_url":"https://api.github.com/users/DuncanRose/following{/other_user}","gists_url":"https://api.github.com/users/DuncanRose/gists{/gist_id}","starred_url":"https://api.github.com/users/DuncanRose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DuncanRose/subscriptions","organizations_url":"https://api.github.com/users/DuncanRose/orgs","repos_url":"https://api.github.com/users/DuncanRose/repos","events_url":"https://api.github.com/users/DuncanRose/events{/privacy}","received_events_url":"https://api.github.com/users/DuncanRose/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-15T23:07:14Z","updated_at":"2015-04-15T23:07:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dee8a11d50b65e1fc6f7fcfd101cea60a611b7b5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DuncanRose/CookR/pulls/2/commits","review_comments_url":"https://api.github.com/repos/DuncanRose/CookR/pulls/2/comments","review_comment_url":"https://api.github.com/repos/DuncanRose/CookR/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DuncanRose/CookR/issues/2/comments","statuses_url":"https://api.github.com/repos/DuncanRose/CookR/statuses/5a06d49c52939105b82fbeca79760037375b267f","head":{"label":"DuncanRose:create_reviews","ref":"create_reviews","sha":"5a06d49c52939105b82fbeca79760037375b267f","user":{"login":"DuncanRose","id":9580892,"avatar_url":"https://avatars.githubusercontent.com/u/9580892?v=3","gravatar_id":"","url":"https://api.github.com/users/DuncanRose","html_url":"https://github.com/DuncanRose","followers_url":"https://api.github.com/users/DuncanRose/followers","following_url":"https://api.github.com/users/DuncanRose/following{/other_user}","gists_url":"https://api.github.com/users/DuncanRose/gists{/gist_id}","starred_url":"https://api.github.com/users/DuncanRose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DuncanRose/subscriptions","organizations_url":"https://api.github.com/users/DuncanRose/orgs","repos_url":"https://api.github.com/users/DuncanRose/repos","events_url":"https://api.github.com/users/DuncanRose/events{/privacy}","received_events_url":"https://api.github.com/users/DuncanRose/received_events","type":"User","site_admin":false},"repo":{"id":33939910,"name":"CookR","full_name":"DuncanRose/CookR","owner":{"login":"DuncanRose","id":9580892,"avatar_url":"https://avatars.githubusercontent.com/u/9580892?v=3","gravatar_id":"","url":"https://api.github.com/users/DuncanRose","html_url":"https://github.com/DuncanRose","followers_url":"https://api.github.com/users/DuncanRose/followers","following_url":"https://api.github.com/users/DuncanRose/following{/other_user}","gists_url":"https://api.github.com/users/DuncanRose/gists{/gist_id}","starred_url":"https://api.github.com/users/DuncanRose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DuncanRose/subscriptions","organizations_url":"https://api.github.com/users/DuncanRose/orgs","repos_url":"https://api.github.com/users/DuncanRose/repos","events_url":"https://api.github.com/users/DuncanRose/events{/privacy}","received_events_url":"https://api.github.com/users/DuncanRose/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DuncanRose/CookR","description":"CookR","fork":false,"url":"https://api.github.com/repos/DuncanRose/CookR","forks_url":"https://api.github.com/repos/DuncanRose/CookR/forks","keys_url":"https://api.github.com/repos/DuncanRose/CookR/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DuncanRose/CookR/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DuncanRose/CookR/teams","hooks_url":"https://api.github.com/repos/DuncanRose/CookR/hooks","issue_events_url":"https://api.github.com/repos/DuncanRose/CookR/issues/events{/number}","events_url":"https://api.github.com/repos/DuncanRose/CookR/events","assignees_url":"https://api.github.com/repos/DuncanRose/CookR/assignees{/user}","branches_url":"https://api.github.com/repos/DuncanRose/CookR/branches{/branch}","tags_url":"https://api.github.com/repos/DuncanRose/CookR/tags","blobs_url":"https://api.github.com/repos/DuncanRose/CookR/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DuncanRose/CookR/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DuncanRose/CookR/git/refs{/sha}","trees_url":"https://api.github.com/repos/DuncanRose/CookR/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DuncanRose/CookR/statuses/{sha}","languages_url":"https://api.github.com/repos/DuncanRose/CookR/languages","stargazers_url":"https://api.github.com/repos/DuncanRose/CookR/stargazers","contributors_url":"https://api.github.com/repos/DuncanRose/CookR/contributors","subscribers_url":"https://api.github.com/repos/DuncanRose/CookR/subscribers","subscription_url":"https://api.github.com/repos/DuncanRose/CookR/subscription","commits_url":"https://api.github.com/repos/DuncanRose/CookR/commits{/sha}","git_commits_url":"https://api.github.com/repos/DuncanRose/CookR/git/commits{/sha}","comments_url":"https://api.github.com/repos/DuncanRose/CookR/comments{/number}","issue_comment_url":"https://api.github.com/repos/DuncanRose/CookR/issues/comments{/number}","contents_url":"https://api.github.com/repos/DuncanRose/CookR/contents/{+path}","compare_url":"https://api.github.com/repos/DuncanRose/CookR/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DuncanRose/CookR/merges","archive_url":"https://api.github.com/repos/DuncanRose/CookR/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DuncanRose/CookR/downloads","issues_url":"https://api.github.com/repos/DuncanRose/CookR/issues{/number}","pulls_url":"https://api.github.com/repos/DuncanRose/CookR/pulls{/number}","milestones_url":"https://api.github.com/repos/DuncanRose/CookR/milestones{/number}","notifications_url":"https://api.github.com/repos/DuncanRose/CookR/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DuncanRose/CookR/labels{/name}","releases_url":"https://api.github.com/repos/DuncanRose/CookR/releases{/id}","created_at":"2015-04-14T15:25:00Z","updated_at":"2015-04-15T13:07:10Z","pushed_at":"2015-04-15T23:07:14Z","git_url":"git://github.com/DuncanRose/CookR.git","ssh_url":"git@github.com:DuncanRose/CookR.git","clone_url":"https://github.com/DuncanRose/CookR.git","svn_url":"https://github.com/DuncanRose/CookR","homepage":null,"size":0,"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":"DuncanRose:master","ref":"master","sha":"e73d804aa8fd6817617c61af880464cb9b04cae1","user":{"login":"DuncanRose","id":9580892,"avatar_url":"https://avatars.githubusercontent.com/u/9580892?v=3","gravatar_id":"","url":"https://api.github.com/users/DuncanRose","html_url":"https://github.com/DuncanRose","followers_url":"https://api.github.com/users/DuncanRose/followers","following_url":"https://api.github.com/users/DuncanRose/following{/other_user}","gists_url":"https://api.github.com/users/DuncanRose/gists{/gist_id}","starred_url":"https://api.github.com/users/DuncanRose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DuncanRose/subscriptions","organizations_url":"https://api.github.com/users/DuncanRose/orgs","repos_url":"https://api.github.com/users/DuncanRose/repos","events_url":"https://api.github.com/users/DuncanRose/events{/privacy}","received_events_url":"https://api.github.com/users/DuncanRose/received_events","type":"User","site_admin":false},"repo":{"id":33939910,"name":"CookR","full_name":"DuncanRose/CookR","owner":{"login":"DuncanRose","id":9580892,"avatar_url":"https://avatars.githubusercontent.com/u/9580892?v=3","gravatar_id":"","url":"https://api.github.com/users/DuncanRose","html_url":"https://github.com/DuncanRose","followers_url":"https://api.github.com/users/DuncanRose/followers","following_url":"https://api.github.com/users/DuncanRose/following{/other_user}","gists_url":"https://api.github.com/users/DuncanRose/gists{/gist_id}","starred_url":"https://api.github.com/users/DuncanRose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DuncanRose/subscriptions","organizations_url":"https://api.github.com/users/DuncanRose/orgs","repos_url":"https://api.github.com/users/DuncanRose/repos","events_url":"https://api.github.com/users/DuncanRose/events{/privacy}","received_events_url":"https://api.github.com/users/DuncanRose/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DuncanRose/CookR","description":"CookR","fork":false,"url":"https://api.github.com/repos/DuncanRose/CookR","forks_url":"https://api.github.com/repos/DuncanRose/CookR/forks","keys_url":"https://api.github.com/repos/DuncanRose/CookR/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DuncanRose/CookR/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DuncanRose/CookR/teams","hooks_url":"https://api.github.com/repos/DuncanRose/CookR/hooks","issue_events_url":"https://api.github.com/repos/DuncanRose/CookR/issues/events{/number}","events_url":"https://api.github.com/repos/DuncanRose/CookR/events","assignees_url":"https://api.github.com/repos/DuncanRose/CookR/assignees{/user}","branches_url":"https://api.github.com/repos/DuncanRose/CookR/branches{/branch}","tags_url":"https://api.github.com/repos/DuncanRose/CookR/tags","blobs_url":"https://api.github.com/repos/DuncanRose/CookR/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DuncanRose/CookR/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DuncanRose/CookR/git/refs{/sha}","trees_url":"https://api.github.com/repos/DuncanRose/CookR/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DuncanRose/CookR/statuses/{sha}","languages_url":"https://api.github.com/repos/DuncanRose/CookR/languages","stargazers_url":"https://api.github.com/repos/DuncanRose/CookR/stargazers","contributors_url":"https://api.github.com/repos/DuncanRose/CookR/contributors","subscribers_url":"https://api.github.com/repos/DuncanRose/CookR/subscribers","subscription_url":"https://api.github.com/repos/DuncanRose/CookR/subscription","commits_url":"https://api.github.com/repos/DuncanRose/CookR/commits{/sha}","git_commits_url":"https://api.github.com/repos/DuncanRose/CookR/git/commits{/sha}","comments_url":"https://api.github.com/repos/DuncanRose/CookR/comments{/number}","issue_comment_url":"https://api.github.com/repos/DuncanRose/CookR/issues/comments{/number}","contents_url":"https://api.github.com/repos/DuncanRose/CookR/contents/{+path}","compare_url":"https://api.github.com/repos/DuncanRose/CookR/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DuncanRose/CookR/merges","archive_url":"https://api.github.com/repos/DuncanRose/CookR/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DuncanRose/CookR/downloads","issues_url":"https://api.github.com/repos/DuncanRose/CookR/issues{/number}","pulls_url":"https://api.github.com/repos/DuncanRose/CookR/pulls{/number}","milestones_url":"https://api.github.com/repos/DuncanRose/CookR/milestones{/number}","notifications_url":"https://api.github.com/repos/DuncanRose/CookR/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DuncanRose/CookR/labels{/name}","releases_url":"https://api.github.com/repos/DuncanRose/CookR/releases{/id}","created_at":"2015-04-14T15:25:00Z","updated_at":"2015-04-15T13:07:10Z","pushed_at":"2015-04-15T23:07:14Z","git_url":"git://github.com/DuncanRose/CookR.git","ssh_url":"git@github.com:DuncanRose/CookR.git","clone_url":"https://github.com/DuncanRose/CookR.git","svn_url":"https://github.com/DuncanRose/CookR","homepage":null,"size":0,"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/DuncanRose/CookR/pulls/2"},"html":{"href":"https://github.com/DuncanRose/CookR/pull/2"},"issue":{"href":"https://api.github.com/repos/DuncanRose/CookR/issues/2"},"comments":{"href":"https://api.github.com/repos/DuncanRose/CookR/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/DuncanRose/CookR/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/DuncanRose/CookR/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DuncanRose/CookR/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/DuncanRose/CookR/statuses/5a06d49c52939105b82fbeca79760037375b267f"}}}}