{"action":"created","comment":{"url":"https://api.github.com/repos/hironori-tsukishima/chat-space/pulls/comments/232485995","pull_request_review_id":173695857,"id":232485995,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjQ4NTk5NQ==","diff_hunk":"@@ -13,6 +13,52 @@ Things you may want to cover:\n \n * Database creation\n \n+## users_table\n+|Column|Type|Options|\n+|------|----|-------|\n+|name|string|null: false, unique:true, add_index :users, :name|\n+|email|string|null: false, unique:true|\n+|password|string|null: false|\n+\n+### Association\n+- has_many :groups, through: :users_groups_relations\n+- has_many :users_groups_relations\n+- has_many :messages\n+\n+\n+## groups_table\n+|Column|Type|Options|\n+|------|----|-------|\n+|name|string|null: false, unique:true|\n+\n+### Association\n+- has_many :users through: :users_groups_relations\n+- has_many :users_groups_relations","path":"README.md","position":24,"original_position":24,"commit_id":"7900ceb02a83bf68e8dcb8874c83c703d7ce6c36","original_commit_id":"7900ceb02a83bf68e8dcb8874c83c703d7ce6c36","user":{"login":"kohei-isoda","id":33193077,"node_id":"MDQ6VXNlcjMzMTkzMDc3","avatar_url":"https://avatars3.githubusercontent.com/u/33193077?v=4","gravatar_id":"","url":"https://api.github.com/users/kohei-isoda","html_url":"https://github.com/kohei-isoda","followers_url":"https://api.github.com/users/kohei-isoda/followers","following_url":"https://api.github.com/users/kohei-isoda/following{/other_user}","gists_url":"https://api.github.com/users/kohei-isoda/gists{/gist_id}","starred_url":"https://api.github.com/users/kohei-isoda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kohei-isoda/subscriptions","organizations_url":"https://api.github.com/users/kohei-isoda/orgs","repos_url":"https://api.github.com/users/kohei-isoda/repos","events_url":"https://api.github.com/users/kohei-isoda/events{/privacy}","received_events_url":"https://api.github.com/users/kohei-isoda/received_events","type":"User","site_admin":false},"body":"throughオプションでusers_groups_relationsを指定していますが、その前にusers_groups_relations自体の定義（has_many :users_groups_relations）が必要になります。コードは上から読まれると言うことを意識しましょう。","created_at":"2018-11-11T12:27:50Z","updated_at":"2018-11-11T12:30:22Z","html_url":"https://github.com/hironori-tsukishima/chat-space/pull/1#discussion_r232485995","pull_request_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/hironori-tsukishima/chat-space/pulls/comments/232485995"},"html":{"href":"https://github.com/hironori-tsukishima/chat-space/pull/1#discussion_r232485995"},"pull_request":{"href":"https://api.github.com/repos/hironori-tsukishima/chat-space/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/hironori-tsukishima/chat-space/pulls/1","id":229945332,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI5OTQ1MzMy","html_url":"https://github.com/hironori-tsukishima/chat-space/pull/1","diff_url":"https://github.com/hironori-tsukishima/chat-space/pull/1.diff","patch_url":"https://github.com/hironori-tsukishima/chat-space/pull/1.patch","issue_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/issues/1","number":1,"state":"open","locked":false,"title":"Edit README","user":{"login":"hironori-tsukishima","id":44799065,"node_id":"MDQ6VXNlcjQ0Nzk5MDY1","avatar_url":"https://avatars1.githubusercontent.com/u/44799065?v=4","gravatar_id":"","url":"https://api.github.com/users/hironori-tsukishima","html_url":"https://github.com/hironori-tsukishima","followers_url":"https://api.github.com/users/hironori-tsukishima/followers","following_url":"https://api.github.com/users/hironori-tsukishima/following{/other_user}","gists_url":"https://api.github.com/users/hironori-tsukishima/gists{/gist_id}","starred_url":"https://api.github.com/users/hironori-tsukishima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hironori-tsukishima/subscriptions","organizations_url":"https://api.github.com/users/hironori-tsukishima/orgs","repos_url":"https://api.github.com/users/hironori-tsukishima/repos","events_url":"https://api.github.com/users/hironori-tsukishima/events{/privacy}","received_events_url":"https://api.github.com/users/hironori-tsukishima/received_events","type":"User","site_admin":false},"body":"chatspaceのDB設計を行った。\n最初のコミットではスペルミスがあることに気づいたので、修正をした","created_at":"2018-11-11T11:12:41Z","updated_at":"2018-11-11T12:30:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3350df9ffab142d738e3a28aa63cd8e660611599","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/pulls/1/commits","review_comments_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/pulls/1/comments","review_comment_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/issues/1/comments","statuses_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/statuses/7900ceb02a83bf68e8dcb8874c83c703d7ce6c36","head":{"label":"hironori-tsukishima:edit_README","ref":"edit_README","sha":"7900ceb02a83bf68e8dcb8874c83c703d7ce6c36","user":{"login":"hironori-tsukishima","id":44799065,"node_id":"MDQ6VXNlcjQ0Nzk5MDY1","avatar_url":"https://avatars1.githubusercontent.com/u/44799065?v=4","gravatar_id":"","url":"https://api.github.com/users/hironori-tsukishima","html_url":"https://github.com/hironori-tsukishima","followers_url":"https://api.github.com/users/hironori-tsukishima/followers","following_url":"https://api.github.com/users/hironori-tsukishima/following{/other_user}","gists_url":"https://api.github.com/users/hironori-tsukishima/gists{/gist_id}","starred_url":"https://api.github.com/users/hironori-tsukishima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hironori-tsukishima/subscriptions","organizations_url":"https://api.github.com/users/hironori-tsukishima/orgs","repos_url":"https://api.github.com/users/hironori-tsukishima/repos","events_url":"https://api.github.com/users/hironori-tsukishima/events{/privacy}","received_events_url":"https://api.github.com/users/hironori-tsukishima/received_events","type":"User","site_admin":false},"repo":{"id":156951047,"node_id":"MDEwOlJlcG9zaXRvcnkxNTY5NTEwNDc=","name":"chat-space","full_name":"hironori-tsukishima/chat-space","private":false,"owner":{"login":"hironori-tsukishima","id":44799065,"node_id":"MDQ6VXNlcjQ0Nzk5MDY1","avatar_url":"https://avatars1.githubusercontent.com/u/44799065?v=4","gravatar_id":"","url":"https://api.github.com/users/hironori-tsukishima","html_url":"https://github.com/hironori-tsukishima","followers_url":"https://api.github.com/users/hironori-tsukishima/followers","following_url":"https://api.github.com/users/hironori-tsukishima/following{/other_user}","gists_url":"https://api.github.com/users/hironori-tsukishima/gists{/gist_id}","starred_url":"https://api.github.com/users/hironori-tsukishima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hironori-tsukishima/subscriptions","organizations_url":"https://api.github.com/users/hironori-tsukishima/orgs","repos_url":"https://api.github.com/users/hironori-tsukishima/repos","events_url":"https://api.github.com/users/hironori-tsukishima/events{/privacy}","received_events_url":"https://api.github.com/users/hironori-tsukishima/received_events","type":"User","site_admin":false},"html_url":"https://github.com/hironori-tsukishima/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/hironori-tsukishima/chat-space","forks_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/forks","keys_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/teams","hooks_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/hooks","issue_events_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/events","assignees_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/tags","blobs_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/languages","stargazers_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/stargazers","contributors_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/contributors","subscribers_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/subscribers","subscription_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/subscription","commits_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/merges","archive_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/downloads","issues_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/deployments","created_at":"2018-11-10T05:34:57Z","updated_at":"2018-11-10T05:35:06Z","pushed_at":"2018-11-11T12:05:26Z","git_url":"git://github.com/hironori-tsukishima/chat-space.git","ssh_url":"git@github.com:hironori-tsukishima/chat-space.git","clone_url":"https://github.com/hironori-tsukishima/chat-space.git","svn_url":"https://github.com/hironori-tsukishima/chat-space","homepage":null,"size":22,"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,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"hironori-tsukishima:master","ref":"master","sha":"09bd0360068f73a2010197f6eca7be78a7a8f9ed","user":{"login":"hironori-tsukishima","id":44799065,"node_id":"MDQ6VXNlcjQ0Nzk5MDY1","avatar_url":"https://avatars1.githubusercontent.com/u/44799065?v=4","gravatar_id":"","url":"https://api.github.com/users/hironori-tsukishima","html_url":"https://github.com/hironori-tsukishima","followers_url":"https://api.github.com/users/hironori-tsukishima/followers","following_url":"https://api.github.com/users/hironori-tsukishima/following{/other_user}","gists_url":"https://api.github.com/users/hironori-tsukishima/gists{/gist_id}","starred_url":"https://api.github.com/users/hironori-tsukishima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hironori-tsukishima/subscriptions","organizations_url":"https://api.github.com/users/hironori-tsukishima/orgs","repos_url":"https://api.github.com/users/hironori-tsukishima/repos","events_url":"https://api.github.com/users/hironori-tsukishima/events{/privacy}","received_events_url":"https://api.github.com/users/hironori-tsukishima/received_events","type":"User","site_admin":false},"repo":{"id":156951047,"node_id":"MDEwOlJlcG9zaXRvcnkxNTY5NTEwNDc=","name":"chat-space","full_name":"hironori-tsukishima/chat-space","private":false,"owner":{"login":"hironori-tsukishima","id":44799065,"node_id":"MDQ6VXNlcjQ0Nzk5MDY1","avatar_url":"https://avatars1.githubusercontent.com/u/44799065?v=4","gravatar_id":"","url":"https://api.github.com/users/hironori-tsukishima","html_url":"https://github.com/hironori-tsukishima","followers_url":"https://api.github.com/users/hironori-tsukishima/followers","following_url":"https://api.github.com/users/hironori-tsukishima/following{/other_user}","gists_url":"https://api.github.com/users/hironori-tsukishima/gists{/gist_id}","starred_url":"https://api.github.com/users/hironori-tsukishima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hironori-tsukishima/subscriptions","organizations_url":"https://api.github.com/users/hironori-tsukishima/orgs","repos_url":"https://api.github.com/users/hironori-tsukishima/repos","events_url":"https://api.github.com/users/hironori-tsukishima/events{/privacy}","received_events_url":"https://api.github.com/users/hironori-tsukishima/received_events","type":"User","site_admin":false},"html_url":"https://github.com/hironori-tsukishima/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/hironori-tsukishima/chat-space","forks_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/forks","keys_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/teams","hooks_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/hooks","issue_events_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/events","assignees_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/tags","blobs_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/languages","stargazers_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/stargazers","contributors_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/contributors","subscribers_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/subscribers","subscription_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/subscription","commits_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/merges","archive_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/downloads","issues_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/hironori-tsukishima/chat-space/deployments","created_at":"2018-11-10T05:34:57Z","updated_at":"2018-11-10T05:35:06Z","pushed_at":"2018-11-11T12:05:26Z","git_url":"git://github.com/hironori-tsukishima/chat-space.git","ssh_url":"git@github.com:hironori-tsukishima/chat-space.git","clone_url":"https://github.com/hironori-tsukishima/chat-space.git","svn_url":"https://github.com/hironori-tsukishima/chat-space","homepage":null,"size":22,"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,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hironori-tsukishima/chat-space/pulls/1"},"html":{"href":"https://github.com/hironori-tsukishima/chat-space/pull/1"},"issue":{"href":"https://api.github.com/repos/hironori-tsukishima/chat-space/issues/1"},"comments":{"href":"https://api.github.com/repos/hironori-tsukishima/chat-space/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/hironori-tsukishima/chat-space/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/hironori-tsukishima/chat-space/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hironori-tsukishima/chat-space/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/hironori-tsukishima/chat-space/statuses/7900ceb02a83bf68e8dcb8874c83c703d7ce6c36"}},"author_association":"OWNER"}}
{"actor":{"display_login":"kohei-isoda"}}