{"action":"created","comment":{"url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/comments/34298435","id":34298435,"diff_hunk":"@@ -7,30 +7,34 @@ def create\n         review_id: @review.id,\n         user_id: current_user.id\n       )\n-      @review.score -= 1\n-\n-      if @downvote.save && @review.save\n-        flash[:notice] = \"Downvote created successfully.\"\n-        redirect_to @beach\n-      else\n-        flash[:notice] = \"Downvote not created successfully.\"\n-        render :new\n+      respond_to do |format|\n+        if @downvote.save\n+          format.html { redirect_to :back,\n+            notice: \"Downvote created successfully.\" }","path":"app/controllers/downvotes_controller.rb","position":15,"original_position":15,"commit_id":"8691bb332431340effb9788514d5a1e42e5a126b","original_commit_id":"8691bb332431340effb9788514d5a1e42e5a126b","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":"Expression at 13, 54 should be on its own line.","created_at":"2015-07-09T20:15:41Z","updated_at":"2015-07-09T20:15:41Z","html_url":"https://github.com/dan3lson/lifes_a_beach/pull/22#discussion_r34298435","pull_request_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/comments/34298435"},"html":{"href":"https://github.com/dan3lson/lifes_a_beach/pull/22#discussion_r34298435"},"pull_request":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22","id":39528681,"html_url":"https://github.com/dan3lson/lifes_a_beach/pull/22","diff_url":"https://github.com/dan3lson/lifes_a_beach/pull/22.diff","patch_url":"https://github.com/dan3lson/lifes_a_beach/pull/22.patch","issue_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/22","number":22,"state":"open","locked":false,"title":"[WIP] AJAX. Need to change class of delete button and add listener for it","user":{"login":"jford8820","id":11723485,"avatar_url":"https://avatars.githubusercontent.com/u/11723485?v=3","gravatar_id":"","url":"https://api.github.com/users/jford8820","html_url":"https://github.com/jford8820","followers_url":"https://api.github.com/users/jford8820/followers","following_url":"https://api.github.com/users/jford8820/following{/other_user}","gists_url":"https://api.github.com/users/jford8820/gists{/gist_id}","starred_url":"https://api.github.com/users/jford8820/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jford8820/subscriptions","organizations_url":"https://api.github.com/users/jford8820/orgs","repos_url":"https://api.github.com/users/jford8820/repos","events_url":"https://api.github.com/users/jford8820/events{/privacy}","received_events_url":"https://api.github.com/users/jford8820/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-08T22:03:55Z","updated_at":"2015-07-09T20:15:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22/commits","review_comments_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22/comments","review_comment_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/22/comments","statuses_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/statuses/8691bb332431340effb9788514d5a1e42e5a126b","head":{"label":"dan3lson:wip-wip-jf","ref":"wip-wip-jf","sha":"8691bb332431340effb9788514d5a1e42e5a126b","user":{"login":"dan3lson","id":11579207,"avatar_url":"https://avatars.githubusercontent.com/u/11579207?v=3","gravatar_id":"","url":"https://api.github.com/users/dan3lson","html_url":"https://github.com/dan3lson","followers_url":"https://api.github.com/users/dan3lson/followers","following_url":"https://api.github.com/users/dan3lson/following{/other_user}","gists_url":"https://api.github.com/users/dan3lson/gists{/gist_id}","starred_url":"https://api.github.com/users/dan3lson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan3lson/subscriptions","organizations_url":"https://api.github.com/users/dan3lson/orgs","repos_url":"https://api.github.com/users/dan3lson/repos","events_url":"https://api.github.com/users/dan3lson/events{/privacy}","received_events_url":"https://api.github.com/users/dan3lson/received_events","type":"User","site_admin":false},"repo":{"id":38254625,"name":"lifes_a_beach","full_name":"dan3lson/lifes_a_beach","owner":{"login":"dan3lson","id":11579207,"avatar_url":"https://avatars.githubusercontent.com/u/11579207?v=3","gravatar_id":"","url":"https://api.github.com/users/dan3lson","html_url":"https://github.com/dan3lson","followers_url":"https://api.github.com/users/dan3lson/followers","following_url":"https://api.github.com/users/dan3lson/following{/other_user}","gists_url":"https://api.github.com/users/dan3lson/gists{/gist_id}","starred_url":"https://api.github.com/users/dan3lson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan3lson/subscriptions","organizations_url":"https://api.github.com/users/dan3lson/orgs","repos_url":"https://api.github.com/users/dan3lson/repos","events_url":"https://api.github.com/users/dan3lson/events{/privacy}","received_events_url":"https://api.github.com/users/dan3lson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dan3lson/lifes_a_beach","description":"Beach review site built with Rails and TDD.","fork":false,"url":"https://api.github.com/repos/dan3lson/lifes_a_beach","forks_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/forks","keys_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/teams","hooks_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/hooks","issue_events_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/events{/number}","events_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/events","assignees_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/assignees{/user}","branches_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/branches{/branch}","tags_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/tags","blobs_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/refs{/sha}","trees_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/statuses/{sha}","languages_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/languages","stargazers_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/stargazers","contributors_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/contributors","subscribers_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/subscribers","subscription_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/subscription","commits_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/commits{/sha}","git_commits_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/commits{/sha}","comments_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/comments{/number}","issue_comment_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/comments{/number}","contents_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/contents/{+path}","compare_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/merges","archive_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/downloads","issues_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues{/number}","pulls_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls{/number}","milestones_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/milestones{/number}","notifications_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/labels{/name}","releases_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/releases{/id}","created_at":"2015-06-29T15:19:29Z","updated_at":"2015-06-29T21:38:20Z","pushed_at":"2015-07-09T20:15:29Z","git_url":"git://github.com/dan3lson/lifes_a_beach.git","ssh_url":"git@github.com:dan3lson/lifes_a_beach.git","clone_url":"https://github.com/dan3lson/lifes_a_beach.git","svn_url":"https://github.com/dan3lson/lifes_a_beach","homepage":null,"size":576,"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":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"dan3lson:master","ref":"master","sha":"69346ae1c5a8a3e11c109e189cfde0daf8499ba5","user":{"login":"dan3lson","id":11579207,"avatar_url":"https://avatars.githubusercontent.com/u/11579207?v=3","gravatar_id":"","url":"https://api.github.com/users/dan3lson","html_url":"https://github.com/dan3lson","followers_url":"https://api.github.com/users/dan3lson/followers","following_url":"https://api.github.com/users/dan3lson/following{/other_user}","gists_url":"https://api.github.com/users/dan3lson/gists{/gist_id}","starred_url":"https://api.github.com/users/dan3lson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan3lson/subscriptions","organizations_url":"https://api.github.com/users/dan3lson/orgs","repos_url":"https://api.github.com/users/dan3lson/repos","events_url":"https://api.github.com/users/dan3lson/events{/privacy}","received_events_url":"https://api.github.com/users/dan3lson/received_events","type":"User","site_admin":false},"repo":{"id":38254625,"name":"lifes_a_beach","full_name":"dan3lson/lifes_a_beach","owner":{"login":"dan3lson","id":11579207,"avatar_url":"https://avatars.githubusercontent.com/u/11579207?v=3","gravatar_id":"","url":"https://api.github.com/users/dan3lson","html_url":"https://github.com/dan3lson","followers_url":"https://api.github.com/users/dan3lson/followers","following_url":"https://api.github.com/users/dan3lson/following{/other_user}","gists_url":"https://api.github.com/users/dan3lson/gists{/gist_id}","starred_url":"https://api.github.com/users/dan3lson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan3lson/subscriptions","organizations_url":"https://api.github.com/users/dan3lson/orgs","repos_url":"https://api.github.com/users/dan3lson/repos","events_url":"https://api.github.com/users/dan3lson/events{/privacy}","received_events_url":"https://api.github.com/users/dan3lson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dan3lson/lifes_a_beach","description":"Beach review site built with Rails and TDD.","fork":false,"url":"https://api.github.com/repos/dan3lson/lifes_a_beach","forks_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/forks","keys_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/teams","hooks_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/hooks","issue_events_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/events{/number}","events_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/events","assignees_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/assignees{/user}","branches_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/branches{/branch}","tags_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/tags","blobs_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/refs{/sha}","trees_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/statuses/{sha}","languages_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/languages","stargazers_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/stargazers","contributors_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/contributors","subscribers_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/subscribers","subscription_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/subscription","commits_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/commits{/sha}","git_commits_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/commits{/sha}","comments_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/comments{/number}","issue_comment_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/comments{/number}","contents_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/contents/{+path}","compare_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/merges","archive_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/downloads","issues_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues{/number}","pulls_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls{/number}","milestones_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/milestones{/number}","notifications_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/labels{/name}","releases_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/releases{/id}","created_at":"2015-06-29T15:19:29Z","updated_at":"2015-06-29T21:38:20Z","pushed_at":"2015-07-09T20:15:29Z","git_url":"git://github.com/dan3lson/lifes_a_beach.git","ssh_url":"git@github.com:dan3lson/lifes_a_beach.git","clone_url":"https://github.com/dan3lson/lifes_a_beach.git","svn_url":"https://github.com/dan3lson/lifes_a_beach","homepage":null,"size":576,"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":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22"},"html":{"href":"https://github.com/dan3lson/lifes_a_beach/pull/22"},"issue":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/22"},"comments":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/statuses/8691bb332431340effb9788514d5a1e42e5a126b"}}}}