{"action":"created","comment":{"url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/pulls/comments/158320329","pull_request_review_id":85113216,"id":158320329,"diff_hunk":"@@ -36,6 +36,13 @@ def update\n     end\n   end\n \n+  def forfeit\n+    @game = Game.find_by(id: params[:id])\n+    @game.forfeit(current_user)\n+    flash[:alert] = 'You have forfeited the game.'\n+    redirect_to games_path","path":"app/controllers/games_controller.rb","position":8,"original_position":8,"commit_id":"b912d636114d879d6161896b39350f86c987541e","original_commit_id":"b912d636114d879d6161896b39350f86c987541e","user":{"login":"dynnog","id":25050983,"avatar_url":"https://avatars0.githubusercontent.com/u/25050983?v=4","gravatar_id":"","url":"https://api.github.com/users/dynnog","html_url":"https://github.com/dynnog","followers_url":"https://api.github.com/users/dynnog/followers","following_url":"https://api.github.com/users/dynnog/following{/other_user}","gists_url":"https://api.github.com/users/dynnog/gists{/gist_id}","starred_url":"https://api.github.com/users/dynnog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dynnog/subscriptions","organizations_url":"https://api.github.com/users/dynnog/orgs","repos_url":"https://api.github.com/users/dynnog/repos","events_url":"https://api.github.com/users/dynnog/events{/privacy}","received_events_url":"https://api.github.com/users/dynnog/received_events","type":"User","site_admin":false},"body":"I'm thinking we can add a modal in the game_show_page to create a pop-up message that verify the user if they want to forfeit. If they choose to forfeit again, then we do `redirect_to games_path, notice: \"You have forfeited the game`.","created_at":"2017-12-21T16:27:43Z","updated_at":"2017-12-21T16:27:43Z","html_url":"https://github.com/goldenmarshmallow/goldenmarshmallow/pull/28#discussion_r158320329","pull_request_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/pulls/28","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/pulls/comments/158320329"},"html":{"href":"https://github.com/goldenmarshmallow/goldenmarshmallow/pull/28#discussion_r158320329"},"pull_request":{"href":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/pulls/28","id":158253317,"html_url":"https://github.com/goldenmarshmallow/goldenmarshmallow/pull/28","diff_url":"https://github.com/goldenmarshmallow/goldenmarshmallow/pull/28.diff","patch_url":"https://github.com/goldenmarshmallow/goldenmarshmallow/pull/28.patch","issue_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/issues/28","number":28,"state":"open","locked":false,"title":"Adding forfeit method and some tests","user":{"login":"rodpat","id":23263510,"avatar_url":"https://avatars0.githubusercontent.com/u/23263510?v=4","gravatar_id":"","url":"https://api.github.com/users/rodpat","html_url":"https://github.com/rodpat","followers_url":"https://api.github.com/users/rodpat/followers","following_url":"https://api.github.com/users/rodpat/following{/other_user}","gists_url":"https://api.github.com/users/rodpat/gists{/gist_id}","starred_url":"https://api.github.com/users/rodpat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodpat/subscriptions","organizations_url":"https://api.github.com/users/rodpat/orgs","repos_url":"https://api.github.com/users/rodpat/repos","events_url":"https://api.github.com/users/rodpat/events{/privacy}","received_events_url":"https://api.github.com/users/rodpat/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-12-14T02:18:57Z","updated_at":"2017-12-21T16:27:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8233e16a08c54002490736e646bb0d68cbac5eec","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/pulls/28/commits","review_comments_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/pulls/28/comments","review_comment_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/issues/28/comments","statuses_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/statuses/b912d636114d879d6161896b39350f86c987541e","head":{"label":"goldenmarshmallow:forfeit_method_v2","ref":"forfeit_method_v2","sha":"b912d636114d879d6161896b39350f86c987541e","user":{"login":"goldenmarshmallow","id":33204637,"avatar_url":"https://avatars2.githubusercontent.com/u/33204637?v=4","gravatar_id":"","url":"https://api.github.com/users/goldenmarshmallow","html_url":"https://github.com/goldenmarshmallow","followers_url":"https://api.github.com/users/goldenmarshmallow/followers","following_url":"https://api.github.com/users/goldenmarshmallow/following{/other_user}","gists_url":"https://api.github.com/users/goldenmarshmallow/gists{/gist_id}","starred_url":"https://api.github.com/users/goldenmarshmallow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldenmarshmallow/subscriptions","organizations_url":"https://api.github.com/users/goldenmarshmallow/orgs","repos_url":"https://api.github.com/users/goldenmarshmallow/repos","events_url":"https://api.github.com/users/goldenmarshmallow/events{/privacy}","received_events_url":"https://api.github.com/users/goldenmarshmallow/received_events","type":"Organization","site_admin":false},"repo":{"id":108763754,"name":"goldenmarshmallow","full_name":"goldenmarshmallow/goldenmarshmallow","owner":{"login":"goldenmarshmallow","id":33204637,"avatar_url":"https://avatars2.githubusercontent.com/u/33204637?v=4","gravatar_id":"","url":"https://api.github.com/users/goldenmarshmallow","html_url":"https://github.com/goldenmarshmallow","followers_url":"https://api.github.com/users/goldenmarshmallow/followers","following_url":"https://api.github.com/users/goldenmarshmallow/following{/other_user}","gists_url":"https://api.github.com/users/goldenmarshmallow/gists{/gist_id}","starred_url":"https://api.github.com/users/goldenmarshmallow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldenmarshmallow/subscriptions","organizations_url":"https://api.github.com/users/goldenmarshmallow/orgs","repos_url":"https://api.github.com/users/goldenmarshmallow/repos","events_url":"https://api.github.com/users/goldenmarshmallow/events{/privacy}","received_events_url":"https://api.github.com/users/goldenmarshmallow/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/goldenmarshmallow/goldenmarshmallow","description":null,"fork":false,"url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow","forks_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/forks","keys_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/teams","hooks_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/hooks","issue_events_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/issues/events{/number}","events_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/events","assignees_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/assignees{/user}","branches_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/branches{/branch}","tags_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/tags","blobs_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/git/refs{/sha}","trees_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/statuses/{sha}","languages_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/languages","stargazers_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/stargazers","contributors_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/contributors","subscribers_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/subscribers","subscription_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/subscription","commits_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/commits{/sha}","git_commits_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/git/commits{/sha}","comments_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/comments{/number}","issue_comment_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/issues/comments{/number}","contents_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/contents/{+path}","compare_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/merges","archive_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/downloads","issues_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/issues{/number}","pulls_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/pulls{/number}","milestones_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/milestones{/number}","notifications_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/labels{/name}","releases_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/releases{/id}","deployments_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/deployments","created_at":"2017-10-29T19:21:02Z","updated_at":"2017-10-29T19:22:00Z","pushed_at":"2017-12-21T10:19:12Z","git_url":"git://github.com/goldenmarshmallow/goldenmarshmallow.git","ssh_url":"git@github.com:goldenmarshmallow/goldenmarshmallow.git","clone_url":"https://github.com/goldenmarshmallow/goldenmarshmallow.git","svn_url":"https://github.com/goldenmarshmallow/goldenmarshmallow","homepage":null,"size":3811,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"goldenmarshmallow:master","ref":"master","sha":"ccb0e64a8e9a16b545813a62976cd42ba8a00e51","user":{"login":"goldenmarshmallow","id":33204637,"avatar_url":"https://avatars2.githubusercontent.com/u/33204637?v=4","gravatar_id":"","url":"https://api.github.com/users/goldenmarshmallow","html_url":"https://github.com/goldenmarshmallow","followers_url":"https://api.github.com/users/goldenmarshmallow/followers","following_url":"https://api.github.com/users/goldenmarshmallow/following{/other_user}","gists_url":"https://api.github.com/users/goldenmarshmallow/gists{/gist_id}","starred_url":"https://api.github.com/users/goldenmarshmallow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldenmarshmallow/subscriptions","organizations_url":"https://api.github.com/users/goldenmarshmallow/orgs","repos_url":"https://api.github.com/users/goldenmarshmallow/repos","events_url":"https://api.github.com/users/goldenmarshmallow/events{/privacy}","received_events_url":"https://api.github.com/users/goldenmarshmallow/received_events","type":"Organization","site_admin":false},"repo":{"id":108763754,"name":"goldenmarshmallow","full_name":"goldenmarshmallow/goldenmarshmallow","owner":{"login":"goldenmarshmallow","id":33204637,"avatar_url":"https://avatars2.githubusercontent.com/u/33204637?v=4","gravatar_id":"","url":"https://api.github.com/users/goldenmarshmallow","html_url":"https://github.com/goldenmarshmallow","followers_url":"https://api.github.com/users/goldenmarshmallow/followers","following_url":"https://api.github.com/users/goldenmarshmallow/following{/other_user}","gists_url":"https://api.github.com/users/goldenmarshmallow/gists{/gist_id}","starred_url":"https://api.github.com/users/goldenmarshmallow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldenmarshmallow/subscriptions","organizations_url":"https://api.github.com/users/goldenmarshmallow/orgs","repos_url":"https://api.github.com/users/goldenmarshmallow/repos","events_url":"https://api.github.com/users/goldenmarshmallow/events{/privacy}","received_events_url":"https://api.github.com/users/goldenmarshmallow/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/goldenmarshmallow/goldenmarshmallow","description":null,"fork":false,"url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow","forks_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/forks","keys_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/teams","hooks_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/hooks","issue_events_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/issues/events{/number}","events_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/events","assignees_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/assignees{/user}","branches_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/branches{/branch}","tags_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/tags","blobs_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/git/refs{/sha}","trees_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/statuses/{sha}","languages_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/languages","stargazers_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/stargazers","contributors_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/contributors","subscribers_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/subscribers","subscription_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/subscription","commits_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/commits{/sha}","git_commits_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/git/commits{/sha}","comments_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/comments{/number}","issue_comment_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/issues/comments{/number}","contents_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/contents/{+path}","compare_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/merges","archive_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/downloads","issues_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/issues{/number}","pulls_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/pulls{/number}","milestones_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/milestones{/number}","notifications_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/labels{/name}","releases_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/releases{/id}","deployments_url":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/deployments","created_at":"2017-10-29T19:21:02Z","updated_at":"2017-10-29T19:22:00Z","pushed_at":"2017-12-21T10:19:12Z","git_url":"git://github.com/goldenmarshmallow/goldenmarshmallow.git","ssh_url":"git@github.com:goldenmarshmallow/goldenmarshmallow.git","clone_url":"https://github.com/goldenmarshmallow/goldenmarshmallow.git","svn_url":"https://github.com/goldenmarshmallow/goldenmarshmallow","homepage":null,"size":3811,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/pulls/28"},"html":{"href":"https://github.com/goldenmarshmallow/goldenmarshmallow/pull/28"},"issue":{"href":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/issues/28"},"comments":{"href":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/goldenmarshmallow/goldenmarshmallow/statuses/b912d636114d879d6161896b39350f86c987541e"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dynnog"}}