{"action":"created","comment":{"url":"https://api.github.com/repos/lfields90/Study-Buddy/pulls/comments/34280901","id":34280901,"diff_hunk":"@@ -29,12 +29,18 @@ def edit\n   def update\n     @spot = Spot.find params[:spot_id]\n     @review = Review.find(params[:id])\n-    if @review.update(review_params)\n-      flash[:success] = \"Review successfully updated\"\n-      redirect_to spot_path(@spot)\n+    if (current_user && current_user.id == @review.user_id) ||\n+      (current_user && current_user.admin?)","path":"app/controllers/reviews_controller.rb","position":17,"original_position":17,"commit_id":"939945695a47c0a4b0ab9800f757750e597daa9a","original_commit_id":"939945695a47c0a4b0ab9800f757750e597daa9a","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":"Use 4 (not 2) spaces for indenting a condition in an `if` statement spanning multiple lines.","created_at":"2015-07-09T17:33:43Z","updated_at":"2015-07-09T17:33:43Z","html_url":"https://github.com/lfields90/Study-Buddy/pull/15#discussion_r34280901","pull_request_url":"https://api.github.com/repos/lfields90/Study-Buddy/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/lfields90/Study-Buddy/pulls/comments/34280901"},"html":{"href":"https://github.com/lfields90/Study-Buddy/pull/15#discussion_r34280901"},"pull_request":{"href":"https://api.github.com/repos/lfields90/Study-Buddy/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/lfields90/Study-Buddy/pulls/15","id":39608030,"html_url":"https://github.com/lfields90/Study-Buddy/pull/15","diff_url":"https://github.com/lfields90/Study-Buddy/pull/15.diff","patch_url":"https://github.com/lfields90/Study-Buddy/pull/15.patch","issue_url":"https://api.github.com/repos/lfields90/Study-Buddy/issues/15","number":15,"state":"open","locked":false,"title":"Spoteditfix","user":{"login":"syzygy333","id":3818710,"avatar_url":"https://avatars.githubusercontent.com/u/3818710?v=3","gravatar_id":"","url":"https://api.github.com/users/syzygy333","html_url":"https://github.com/syzygy333","followers_url":"https://api.github.com/users/syzygy333/followers","following_url":"https://api.github.com/users/syzygy333/following{/other_user}","gists_url":"https://api.github.com/users/syzygy333/gists{/gist_id}","starred_url":"https://api.github.com/users/syzygy333/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syzygy333/subscriptions","organizations_url":"https://api.github.com/users/syzygy333/orgs","repos_url":"https://api.github.com/users/syzygy333/repos","events_url":"https://api.github.com/users/syzygy333/events{/privacy}","received_events_url":"https://api.github.com/users/syzygy333/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-09T17:29:32Z","updated_at":"2015-07-09T17:33:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d1bda91554af127cfd12e47da680c9363cb120c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/lfields90/Study-Buddy/pulls/15/commits","review_comments_url":"https://api.github.com/repos/lfields90/Study-Buddy/pulls/15/comments","review_comment_url":"https://api.github.com/repos/lfields90/Study-Buddy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lfields90/Study-Buddy/issues/15/comments","statuses_url":"https://api.github.com/repos/lfields90/Study-Buddy/statuses/939945695a47c0a4b0ab9800f757750e597daa9a","head":{"label":"lfields90:spoteditfix","ref":"spoteditfix","sha":"939945695a47c0a4b0ab9800f757750e597daa9a","user":{"login":"lfields90","id":11277816,"avatar_url":"https://avatars.githubusercontent.com/u/11277816?v=3","gravatar_id":"","url":"https://api.github.com/users/lfields90","html_url":"https://github.com/lfields90","followers_url":"https://api.github.com/users/lfields90/followers","following_url":"https://api.github.com/users/lfields90/following{/other_user}","gists_url":"https://api.github.com/users/lfields90/gists{/gist_id}","starred_url":"https://api.github.com/users/lfields90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfields90/subscriptions","organizations_url":"https://api.github.com/users/lfields90/orgs","repos_url":"https://api.github.com/users/lfields90/repos","events_url":"https://api.github.com/users/lfields90/events{/privacy}","received_events_url":"https://api.github.com/users/lfields90/received_events","type":"User","site_admin":false},"repo":{"id":38254796,"name":"Study-Buddy","full_name":"lfields90/Study-Buddy","owner":{"login":"lfields90","id":11277816,"avatar_url":"https://avatars.githubusercontent.com/u/11277816?v=3","gravatar_id":"","url":"https://api.github.com/users/lfields90","html_url":"https://github.com/lfields90","followers_url":"https://api.github.com/users/lfields90/followers","following_url":"https://api.github.com/users/lfields90/following{/other_user}","gists_url":"https://api.github.com/users/lfields90/gists{/gist_id}","starred_url":"https://api.github.com/users/lfields90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfields90/subscriptions","organizations_url":"https://api.github.com/users/lfields90/orgs","repos_url":"https://api.github.com/users/lfields90/repos","events_url":"https://api.github.com/users/lfields90/events{/privacy}","received_events_url":"https://api.github.com/users/lfields90/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lfields90/Study-Buddy","description":"Small Group Project","fork":false,"url":"https://api.github.com/repos/lfields90/Study-Buddy","forks_url":"https://api.github.com/repos/lfields90/Study-Buddy/forks","keys_url":"https://api.github.com/repos/lfields90/Study-Buddy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lfields90/Study-Buddy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lfields90/Study-Buddy/teams","hooks_url":"https://api.github.com/repos/lfields90/Study-Buddy/hooks","issue_events_url":"https://api.github.com/repos/lfields90/Study-Buddy/issues/events{/number}","events_url":"https://api.github.com/repos/lfields90/Study-Buddy/events","assignees_url":"https://api.github.com/repos/lfields90/Study-Buddy/assignees{/user}","branches_url":"https://api.github.com/repos/lfields90/Study-Buddy/branches{/branch}","tags_url":"https://api.github.com/repos/lfields90/Study-Buddy/tags","blobs_url":"https://api.github.com/repos/lfields90/Study-Buddy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lfields90/Study-Buddy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lfields90/Study-Buddy/git/refs{/sha}","trees_url":"https://api.github.com/repos/lfields90/Study-Buddy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lfields90/Study-Buddy/statuses/{sha}","languages_url":"https://api.github.com/repos/lfields90/Study-Buddy/languages","stargazers_url":"https://api.github.com/repos/lfields90/Study-Buddy/stargazers","contributors_url":"https://api.github.com/repos/lfields90/Study-Buddy/contributors","subscribers_url":"https://api.github.com/repos/lfields90/Study-Buddy/subscribers","subscription_url":"https://api.github.com/repos/lfields90/Study-Buddy/subscription","commits_url":"https://api.github.com/repos/lfields90/Study-Buddy/commits{/sha}","git_commits_url":"https://api.github.com/repos/lfields90/Study-Buddy/git/commits{/sha}","comments_url":"https://api.github.com/repos/lfields90/Study-Buddy/comments{/number}","issue_comment_url":"https://api.github.com/repos/lfields90/Study-Buddy/issues/comments{/number}","contents_url":"https://api.github.com/repos/lfields90/Study-Buddy/contents/{+path}","compare_url":"https://api.github.com/repos/lfields90/Study-Buddy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lfields90/Study-Buddy/merges","archive_url":"https://api.github.com/repos/lfields90/Study-Buddy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lfields90/Study-Buddy/downloads","issues_url":"https://api.github.com/repos/lfields90/Study-Buddy/issues{/number}","pulls_url":"https://api.github.com/repos/lfields90/Study-Buddy/pulls{/number}","milestones_url":"https://api.github.com/repos/lfields90/Study-Buddy/milestones{/number}","notifications_url":"https://api.github.com/repos/lfields90/Study-Buddy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lfields90/Study-Buddy/labels{/name}","releases_url":"https://api.github.com/repos/lfields90/Study-Buddy/releases{/id}","created_at":"2015-06-29T15:22:31Z","updated_at":"2015-07-07T03:25:52Z","pushed_at":"2015-07-09T17:33:37Z","git_url":"git://github.com/lfields90/Study-Buddy.git","ssh_url":"git@github.com:lfields90/Study-Buddy.git","clone_url":"https://github.com/lfields90/Study-Buddy.git","svn_url":"https://github.com/lfields90/Study-Buddy","homepage":null,"size":536,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":2,"default_branch":"master"}},"base":{"label":"lfields90:master","ref":"master","sha":"76d837a8015da0132ef31eae5fcabd467dc2d0cb","user":{"login":"lfields90","id":11277816,"avatar_url":"https://avatars.githubusercontent.com/u/11277816?v=3","gravatar_id":"","url":"https://api.github.com/users/lfields90","html_url":"https://github.com/lfields90","followers_url":"https://api.github.com/users/lfields90/followers","following_url":"https://api.github.com/users/lfields90/following{/other_user}","gists_url":"https://api.github.com/users/lfields90/gists{/gist_id}","starred_url":"https://api.github.com/users/lfields90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfields90/subscriptions","organizations_url":"https://api.github.com/users/lfields90/orgs","repos_url":"https://api.github.com/users/lfields90/repos","events_url":"https://api.github.com/users/lfields90/events{/privacy}","received_events_url":"https://api.github.com/users/lfields90/received_events","type":"User","site_admin":false},"repo":{"id":38254796,"name":"Study-Buddy","full_name":"lfields90/Study-Buddy","owner":{"login":"lfields90","id":11277816,"avatar_url":"https://avatars.githubusercontent.com/u/11277816?v=3","gravatar_id":"","url":"https://api.github.com/users/lfields90","html_url":"https://github.com/lfields90","followers_url":"https://api.github.com/users/lfields90/followers","following_url":"https://api.github.com/users/lfields90/following{/other_user}","gists_url":"https://api.github.com/users/lfields90/gists{/gist_id}","starred_url":"https://api.github.com/users/lfields90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lfields90/subscriptions","organizations_url":"https://api.github.com/users/lfields90/orgs","repos_url":"https://api.github.com/users/lfields90/repos","events_url":"https://api.github.com/users/lfields90/events{/privacy}","received_events_url":"https://api.github.com/users/lfields90/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lfields90/Study-Buddy","description":"Small Group Project","fork":false,"url":"https://api.github.com/repos/lfields90/Study-Buddy","forks_url":"https://api.github.com/repos/lfields90/Study-Buddy/forks","keys_url":"https://api.github.com/repos/lfields90/Study-Buddy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lfields90/Study-Buddy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lfields90/Study-Buddy/teams","hooks_url":"https://api.github.com/repos/lfields90/Study-Buddy/hooks","issue_events_url":"https://api.github.com/repos/lfields90/Study-Buddy/issues/events{/number}","events_url":"https://api.github.com/repos/lfields90/Study-Buddy/events","assignees_url":"https://api.github.com/repos/lfields90/Study-Buddy/assignees{/user}","branches_url":"https://api.github.com/repos/lfields90/Study-Buddy/branches{/branch}","tags_url":"https://api.github.com/repos/lfields90/Study-Buddy/tags","blobs_url":"https://api.github.com/repos/lfields90/Study-Buddy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lfields90/Study-Buddy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lfields90/Study-Buddy/git/refs{/sha}","trees_url":"https://api.github.com/repos/lfields90/Study-Buddy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lfields90/Study-Buddy/statuses/{sha}","languages_url":"https://api.github.com/repos/lfields90/Study-Buddy/languages","stargazers_url":"https://api.github.com/repos/lfields90/Study-Buddy/stargazers","contributors_url":"https://api.github.com/repos/lfields90/Study-Buddy/contributors","subscribers_url":"https://api.github.com/repos/lfields90/Study-Buddy/subscribers","subscription_url":"https://api.github.com/repos/lfields90/Study-Buddy/subscription","commits_url":"https://api.github.com/repos/lfields90/Study-Buddy/commits{/sha}","git_commits_url":"https://api.github.com/repos/lfields90/Study-Buddy/git/commits{/sha}","comments_url":"https://api.github.com/repos/lfields90/Study-Buddy/comments{/number}","issue_comment_url":"https://api.github.com/repos/lfields90/Study-Buddy/issues/comments{/number}","contents_url":"https://api.github.com/repos/lfields90/Study-Buddy/contents/{+path}","compare_url":"https://api.github.com/repos/lfields90/Study-Buddy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lfields90/Study-Buddy/merges","archive_url":"https://api.github.com/repos/lfields90/Study-Buddy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lfields90/Study-Buddy/downloads","issues_url":"https://api.github.com/repos/lfields90/Study-Buddy/issues{/number}","pulls_url":"https://api.github.com/repos/lfields90/Study-Buddy/pulls{/number}","milestones_url":"https://api.github.com/repos/lfields90/Study-Buddy/milestones{/number}","notifications_url":"https://api.github.com/repos/lfields90/Study-Buddy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lfields90/Study-Buddy/labels{/name}","releases_url":"https://api.github.com/repos/lfields90/Study-Buddy/releases{/id}","created_at":"2015-06-29T15:22:31Z","updated_at":"2015-07-07T03:25:52Z","pushed_at":"2015-07-09T17:33:37Z","git_url":"git://github.com/lfields90/Study-Buddy.git","ssh_url":"git@github.com:lfields90/Study-Buddy.git","clone_url":"https://github.com/lfields90/Study-Buddy.git","svn_url":"https://github.com/lfields90/Study-Buddy","homepage":null,"size":536,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lfields90/Study-Buddy/pulls/15"},"html":{"href":"https://github.com/lfields90/Study-Buddy/pull/15"},"issue":{"href":"https://api.github.com/repos/lfields90/Study-Buddy/issues/15"},"comments":{"href":"https://api.github.com/repos/lfields90/Study-Buddy/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/lfields90/Study-Buddy/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/lfields90/Study-Buddy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lfields90/Study-Buddy/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/lfields90/Study-Buddy/statuses/939945695a47c0a4b0ab9800f757750e597daa9a"}}}}