{"action":"created","comment":{"url":"https://api.github.com/repos/Nacchamu/chat-space/pulls/comments/110074213","pull_request_review_id":31218794,"id":110074213,"diff_hunk":"@@ -1,13 +1,46 @@\n class GroupsController < ApplicationController\n   def index\n-\n+    @groups = current_user.groups.order(updated_at: :DESC)","path":"app/controllers/groups_controller.rb","position":4,"original_position":4,"commit_id":"e4196adca4ae3e529f739836a119e04b282c812f","original_commit_id":"e4196adca4ae3e529f739836a119e04b282c812f","user":{"login":"snowhork","id":18437866,"avatar_url":"https://avatars1.githubusercontent.com/u/18437866?v=3","gravatar_id":"","url":"https://api.github.com/users/snowhork","html_url":"https://github.com/snowhork","followers_url":"https://api.github.com/users/snowhork/followers","following_url":"https://api.github.com/users/snowhork/following{/other_user}","gists_url":"https://api.github.com/users/snowhork/gists{/gist_id}","starred_url":"https://api.github.com/users/snowhork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snowhork/subscriptions","organizations_url":"https://api.github.com/users/snowhork/orgs","repos_url":"https://api.github.com/users/snowhork/repos","events_url":"https://api.github.com/users/snowhork/events{/privacy}","received_events_url":"https://api.github.com/users/snowhork/received_events","type":"User","site_admin":false},"body":"この記述が繰り返し使われているようなので、before_actionでset_groups を定義してあげてindexとshowで使うようにしましょう！","created_at":"2017-04-06T03:43:19Z","updated_at":"2017-04-06T03:45:07Z","html_url":"https://github.com/Nacchamu/chat-space/pull/6#discussion_r110074213","pull_request_url":"https://api.github.com/repos/Nacchamu/chat-space/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/Nacchamu/chat-space/pulls/comments/110074213"},"html":{"href":"https://github.com/Nacchamu/chat-space/pull/6#discussion_r110074213"},"pull_request":{"href":"https://api.github.com/repos/Nacchamu/chat-space/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/Nacchamu/chat-space/pulls/6","id":114107391,"html_url":"https://github.com/Nacchamu/chat-space/pull/6","diff_url":"https://github.com/Nacchamu/chat-space/pull/6.diff","patch_url":"https://github.com/Nacchamu/chat-space/pull/6.patch","issue_url":"https://api.github.com/repos/Nacchamu/chat-space/issues/6","number":6,"state":"open","locked":false,"title":"make group & add user","user":{"login":"Nacchamu","id":26707901,"avatar_url":"https://avatars0.githubusercontent.com/u/26707901?v=3","gravatar_id":"","url":"https://api.github.com/users/Nacchamu","html_url":"https://github.com/Nacchamu","followers_url":"https://api.github.com/users/Nacchamu/followers","following_url":"https://api.github.com/users/Nacchamu/following{/other_user}","gists_url":"https://api.github.com/users/Nacchamu/gists{/gist_id}","starred_url":"https://api.github.com/users/Nacchamu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nacchamu/subscriptions","organizations_url":"https://api.github.com/users/Nacchamu/orgs","repos_url":"https://api.github.com/users/Nacchamu/repos","events_url":"https://api.github.com/users/Nacchamu/events{/privacy}","received_events_url":"https://api.github.com/users/Nacchamu/received_events","type":"User","site_admin":false},"body":"# WHAT\r\nグループ作成機能の追加。\r\n\r\n# WHY\r\nグループを作り、メンバーを追加できるようになるため。","created_at":"2017-04-04T09:40:19Z","updated_at":"2017-04-06T03:45:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a60d536e6a0d6ab36c2a12e4c20ea3855338800e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Nacchamu/chat-space/pulls/6/commits","review_comments_url":"https://api.github.com/repos/Nacchamu/chat-space/pulls/6/comments","review_comment_url":"https://api.github.com/repos/Nacchamu/chat-space/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Nacchamu/chat-space/issues/6/comments","statuses_url":"https://api.github.com/repos/Nacchamu/chat-space/statuses/e4196adca4ae3e529f739836a119e04b282c812f","head":{"label":"Nacchamu:make-group-functions","ref":"make-group-functions","sha":"e4196adca4ae3e529f739836a119e04b282c812f","user":{"login":"Nacchamu","id":26707901,"avatar_url":"https://avatars0.githubusercontent.com/u/26707901?v=3","gravatar_id":"","url":"https://api.github.com/users/Nacchamu","html_url":"https://github.com/Nacchamu","followers_url":"https://api.github.com/users/Nacchamu/followers","following_url":"https://api.github.com/users/Nacchamu/following{/other_user}","gists_url":"https://api.github.com/users/Nacchamu/gists{/gist_id}","starred_url":"https://api.github.com/users/Nacchamu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nacchamu/subscriptions","organizations_url":"https://api.github.com/users/Nacchamu/orgs","repos_url":"https://api.github.com/users/Nacchamu/repos","events_url":"https://api.github.com/users/Nacchamu/events{/privacy}","received_events_url":"https://api.github.com/users/Nacchamu/received_events","type":"User","site_admin":false},"repo":{"id":86567404,"name":"chat-space","full_name":"Nacchamu/chat-space","owner":{"login":"Nacchamu","id":26707901,"avatar_url":"https://avatars0.githubusercontent.com/u/26707901?v=3","gravatar_id":"","url":"https://api.github.com/users/Nacchamu","html_url":"https://github.com/Nacchamu","followers_url":"https://api.github.com/users/Nacchamu/followers","following_url":"https://api.github.com/users/Nacchamu/following{/other_user}","gists_url":"https://api.github.com/users/Nacchamu/gists{/gist_id}","starred_url":"https://api.github.com/users/Nacchamu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nacchamu/subscriptions","organizations_url":"https://api.github.com/users/Nacchamu/orgs","repos_url":"https://api.github.com/users/Nacchamu/repos","events_url":"https://api.github.com/users/Nacchamu/events{/privacy}","received_events_url":"https://api.github.com/users/Nacchamu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nacchamu/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/Nacchamu/chat-space","forks_url":"https://api.github.com/repos/Nacchamu/chat-space/forks","keys_url":"https://api.github.com/repos/Nacchamu/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nacchamu/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nacchamu/chat-space/teams","hooks_url":"https://api.github.com/repos/Nacchamu/chat-space/hooks","issue_events_url":"https://api.github.com/repos/Nacchamu/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/Nacchamu/chat-space/events","assignees_url":"https://api.github.com/repos/Nacchamu/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/Nacchamu/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/Nacchamu/chat-space/tags","blobs_url":"https://api.github.com/repos/Nacchamu/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nacchamu/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nacchamu/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nacchamu/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nacchamu/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/Nacchamu/chat-space/languages","stargazers_url":"https://api.github.com/repos/Nacchamu/chat-space/stargazers","contributors_url":"https://api.github.com/repos/Nacchamu/chat-space/contributors","subscribers_url":"https://api.github.com/repos/Nacchamu/chat-space/subscribers","subscription_url":"https://api.github.com/repos/Nacchamu/chat-space/subscription","commits_url":"https://api.github.com/repos/Nacchamu/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nacchamu/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nacchamu/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nacchamu/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nacchamu/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/Nacchamu/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nacchamu/chat-space/merges","archive_url":"https://api.github.com/repos/Nacchamu/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nacchamu/chat-space/downloads","issues_url":"https://api.github.com/repos/Nacchamu/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/Nacchamu/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/Nacchamu/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/Nacchamu/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nacchamu/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/Nacchamu/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/Nacchamu/chat-space/deployments","created_at":"2017-03-29T10:09:30Z","updated_at":"2017-03-29T10:11:22Z","pushed_at":"2017-04-06T03:39:21Z","git_url":"git://github.com/Nacchamu/chat-space.git","ssh_url":"git@github.com:Nacchamu/chat-space.git","clone_url":"https://github.com/Nacchamu/chat-space.git","svn_url":"https://github.com/Nacchamu/chat-space","homepage":null,"size":100,"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":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Nacchamu:master","ref":"master","sha":"68bf8bb883dc7dfb4de0e588f0816e00248f9c7b","user":{"login":"Nacchamu","id":26707901,"avatar_url":"https://avatars0.githubusercontent.com/u/26707901?v=3","gravatar_id":"","url":"https://api.github.com/users/Nacchamu","html_url":"https://github.com/Nacchamu","followers_url":"https://api.github.com/users/Nacchamu/followers","following_url":"https://api.github.com/users/Nacchamu/following{/other_user}","gists_url":"https://api.github.com/users/Nacchamu/gists{/gist_id}","starred_url":"https://api.github.com/users/Nacchamu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nacchamu/subscriptions","organizations_url":"https://api.github.com/users/Nacchamu/orgs","repos_url":"https://api.github.com/users/Nacchamu/repos","events_url":"https://api.github.com/users/Nacchamu/events{/privacy}","received_events_url":"https://api.github.com/users/Nacchamu/received_events","type":"User","site_admin":false},"repo":{"id":86567404,"name":"chat-space","full_name":"Nacchamu/chat-space","owner":{"login":"Nacchamu","id":26707901,"avatar_url":"https://avatars0.githubusercontent.com/u/26707901?v=3","gravatar_id":"","url":"https://api.github.com/users/Nacchamu","html_url":"https://github.com/Nacchamu","followers_url":"https://api.github.com/users/Nacchamu/followers","following_url":"https://api.github.com/users/Nacchamu/following{/other_user}","gists_url":"https://api.github.com/users/Nacchamu/gists{/gist_id}","starred_url":"https://api.github.com/users/Nacchamu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nacchamu/subscriptions","organizations_url":"https://api.github.com/users/Nacchamu/orgs","repos_url":"https://api.github.com/users/Nacchamu/repos","events_url":"https://api.github.com/users/Nacchamu/events{/privacy}","received_events_url":"https://api.github.com/users/Nacchamu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nacchamu/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/Nacchamu/chat-space","forks_url":"https://api.github.com/repos/Nacchamu/chat-space/forks","keys_url":"https://api.github.com/repos/Nacchamu/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nacchamu/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nacchamu/chat-space/teams","hooks_url":"https://api.github.com/repos/Nacchamu/chat-space/hooks","issue_events_url":"https://api.github.com/repos/Nacchamu/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/Nacchamu/chat-space/events","assignees_url":"https://api.github.com/repos/Nacchamu/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/Nacchamu/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/Nacchamu/chat-space/tags","blobs_url":"https://api.github.com/repos/Nacchamu/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nacchamu/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nacchamu/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nacchamu/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nacchamu/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/Nacchamu/chat-space/languages","stargazers_url":"https://api.github.com/repos/Nacchamu/chat-space/stargazers","contributors_url":"https://api.github.com/repos/Nacchamu/chat-space/contributors","subscribers_url":"https://api.github.com/repos/Nacchamu/chat-space/subscribers","subscription_url":"https://api.github.com/repos/Nacchamu/chat-space/subscription","commits_url":"https://api.github.com/repos/Nacchamu/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nacchamu/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nacchamu/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nacchamu/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nacchamu/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/Nacchamu/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nacchamu/chat-space/merges","archive_url":"https://api.github.com/repos/Nacchamu/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nacchamu/chat-space/downloads","issues_url":"https://api.github.com/repos/Nacchamu/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/Nacchamu/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/Nacchamu/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/Nacchamu/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nacchamu/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/Nacchamu/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/Nacchamu/chat-space/deployments","created_at":"2017-03-29T10:09:30Z","updated_at":"2017-03-29T10:11:22Z","pushed_at":"2017-04-06T03:39:21Z","git_url":"git://github.com/Nacchamu/chat-space.git","ssh_url":"git@github.com:Nacchamu/chat-space.git","clone_url":"https://github.com/Nacchamu/chat-space.git","svn_url":"https://github.com/Nacchamu/chat-space","homepage":null,"size":100,"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":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/Nacchamu/chat-space/pulls/6"},"html":{"href":"https://github.com/Nacchamu/chat-space/pull/6"},"issue":{"href":"https://api.github.com/repos/Nacchamu/chat-space/issues/6"},"comments":{"href":"https://api.github.com/repos/Nacchamu/chat-space/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/Nacchamu/chat-space/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/Nacchamu/chat-space/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Nacchamu/chat-space/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/Nacchamu/chat-space/statuses/e4196adca4ae3e529f739836a119e04b282c812f"}}}}
{"actor":{"display_login":"snowhork"}}