{"action":"created","comment":{"url":"https://api.github.com/repos/nao37/chat-space/pulls/comments/125801931","pull_request_review_id":48224787,"id":125801931,"diff_hunk":"@@ -2,10 +2,29 @@ class MessagesController < ApplicationController\n   before_action :set_groups\n \n   def index\n+    set_group\n+  end\n+\n+  def create\n+    @message = Message.new(message_params)\n+    if @message.save\n+      redirect_to group_messages_path(params[:group_id])","path":"app/controllers/messages_controller.rb","position":10,"original_position":10,"commit_id":"0f42cc0b06d657bb9ec5effb1c03af1983b0c32f","original_commit_id":"0f42cc0b06d657bb9ec5effb1c03af1983b0c32f","user":{"login":"maiki055","id":3395844,"avatar_url":"https://avatars0.githubusercontent.com/u/3395844?v=3","gravatar_id":"","url":"https://api.github.com/users/maiki055","html_url":"https://github.com/maiki055","followers_url":"https://api.github.com/users/maiki055/followers","following_url":"https://api.github.com/users/maiki055/following{/other_user}","gists_url":"https://api.github.com/users/maiki055/gists{/gist_id}","starred_url":"https://api.github.com/users/maiki055/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maiki055/subscriptions","organizations_url":"https://api.github.com/users/maiki055/orgs","repos_url":"https://api.github.com/users/maiki055/repos","events_url":"https://api.github.com/users/maiki055/events{/privacy}","received_events_url":"https://api.github.com/users/maiki055/received_events","type":"User","site_admin":false},"body":"```params[:group_id]```でも良いのですが、せっかくなので取得済みの```@group```を引数に指定したほうがより分かりやすい記述となります！","created_at":"2017-07-06T02:53:53Z","updated_at":"2017-07-06T02:53:53Z","html_url":"https://github.com/nao37/chat-space/pull/14#discussion_r125801931","pull_request_url":"https://api.github.com/repos/nao37/chat-space/pulls/14","_links":{"self":{"href":"https://api.github.com/repos/nao37/chat-space/pulls/comments/125801931"},"html":{"href":"https://github.com/nao37/chat-space/pull/14#discussion_r125801931"},"pull_request":{"href":"https://api.github.com/repos/nao37/chat-space/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/nao37/chat-space/pulls/14","id":128883203,"html_url":"https://github.com/nao37/chat-space/pull/14","diff_url":"https://github.com/nao37/chat-space/pull/14.diff","patch_url":"https://github.com/nao37/chat-space/pull/14.patch","issue_url":"https://api.github.com/repos/nao37/chat-space/issues/14","number":14,"state":"open","locked":false,"title":"Create message sending function.","user":{"login":"nao37","id":29706324,"avatar_url":"https://avatars1.githubusercontent.com/u/29706324?v=3","gravatar_id":"","url":"https://api.github.com/users/nao37","html_url":"https://github.com/nao37","followers_url":"https://api.github.com/users/nao37/followers","following_url":"https://api.github.com/users/nao37/following{/other_user}","gists_url":"https://api.github.com/users/nao37/gists{/gist_id}","starred_url":"https://api.github.com/users/nao37/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nao37/subscriptions","organizations_url":"https://api.github.com/users/nao37/orgs","repos_url":"https://api.github.com/users/nao37/repos","events_url":"https://api.github.com/users/nao37/events{/privacy}","received_events_url":"https://api.github.com/users/nao37/received_events","type":"User","site_admin":false},"body":"# WHAT\n・メッセージ送信機能をつける。\n\n# WHY\n・メッセージ送信機能をつける必要があるため。","created_at":"2017-07-05T05:02:41Z","updated_at":"2017-07-06T02:53:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58488dcb40be1772b0cdf349ac3078f0e023bedb","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/nao37/chat-space/pulls/14/commits","review_comments_url":"https://api.github.com/repos/nao37/chat-space/pulls/14/comments","review_comment_url":"https://api.github.com/repos/nao37/chat-space/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nao37/chat-space/issues/14/comments","statuses_url":"https://api.github.com/repos/nao37/chat-space/statuses/0f42cc0b06d657bb9ec5effb1c03af1983b0c32f","head":{"label":"nao37:Create_message_sending_function","ref":"Create_message_sending_function","sha":"0f42cc0b06d657bb9ec5effb1c03af1983b0c32f","user":{"login":"nao37","id":29706324,"avatar_url":"https://avatars1.githubusercontent.com/u/29706324?v=3","gravatar_id":"","url":"https://api.github.com/users/nao37","html_url":"https://github.com/nao37","followers_url":"https://api.github.com/users/nao37/followers","following_url":"https://api.github.com/users/nao37/following{/other_user}","gists_url":"https://api.github.com/users/nao37/gists{/gist_id}","starred_url":"https://api.github.com/users/nao37/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nao37/subscriptions","organizations_url":"https://api.github.com/users/nao37/orgs","repos_url":"https://api.github.com/users/nao37/repos","events_url":"https://api.github.com/users/nao37/events{/privacy}","received_events_url":"https://api.github.com/users/nao37/received_events","type":"User","site_admin":false},"repo":{"id":95520696,"name":"chat-space","full_name":"nao37/chat-space","owner":{"login":"nao37","id":29706324,"avatar_url":"https://avatars1.githubusercontent.com/u/29706324?v=3","gravatar_id":"","url":"https://api.github.com/users/nao37","html_url":"https://github.com/nao37","followers_url":"https://api.github.com/users/nao37/followers","following_url":"https://api.github.com/users/nao37/following{/other_user}","gists_url":"https://api.github.com/users/nao37/gists{/gist_id}","starred_url":"https://api.github.com/users/nao37/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nao37/subscriptions","organizations_url":"https://api.github.com/users/nao37/orgs","repos_url":"https://api.github.com/users/nao37/repos","events_url":"https://api.github.com/users/nao37/events{/privacy}","received_events_url":"https://api.github.com/users/nao37/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nao37/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/nao37/chat-space","forks_url":"https://api.github.com/repos/nao37/chat-space/forks","keys_url":"https://api.github.com/repos/nao37/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nao37/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nao37/chat-space/teams","hooks_url":"https://api.github.com/repos/nao37/chat-space/hooks","issue_events_url":"https://api.github.com/repos/nao37/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/nao37/chat-space/events","assignees_url":"https://api.github.com/repos/nao37/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/nao37/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/nao37/chat-space/tags","blobs_url":"https://api.github.com/repos/nao37/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nao37/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nao37/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/nao37/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nao37/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/nao37/chat-space/languages","stargazers_url":"https://api.github.com/repos/nao37/chat-space/stargazers","contributors_url":"https://api.github.com/repos/nao37/chat-space/contributors","subscribers_url":"https://api.github.com/repos/nao37/chat-space/subscribers","subscription_url":"https://api.github.com/repos/nao37/chat-space/subscription","commits_url":"https://api.github.com/repos/nao37/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/nao37/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/nao37/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/nao37/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/nao37/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/nao37/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nao37/chat-space/merges","archive_url":"https://api.github.com/repos/nao37/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nao37/chat-space/downloads","issues_url":"https://api.github.com/repos/nao37/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/nao37/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/nao37/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/nao37/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nao37/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/nao37/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/nao37/chat-space/deployments","created_at":"2017-06-27T05:26:40Z","updated_at":"2017-06-29T03:22:22Z","pushed_at":"2017-07-06T02:36:41Z","git_url":"git://github.com/nao37/chat-space.git","ssh_url":"git@github.com:nao37/chat-space.git","clone_url":"https://github.com/nao37/chat-space.git","svn_url":"https://github.com/nao37/chat-space","homepage":"","size":98,"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":"nao37:master","ref":"master","sha":"fd9fc0974e935f92cc49e009aa591377d83a87c9","user":{"login":"nao37","id":29706324,"avatar_url":"https://avatars1.githubusercontent.com/u/29706324?v=3","gravatar_id":"","url":"https://api.github.com/users/nao37","html_url":"https://github.com/nao37","followers_url":"https://api.github.com/users/nao37/followers","following_url":"https://api.github.com/users/nao37/following{/other_user}","gists_url":"https://api.github.com/users/nao37/gists{/gist_id}","starred_url":"https://api.github.com/users/nao37/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nao37/subscriptions","organizations_url":"https://api.github.com/users/nao37/orgs","repos_url":"https://api.github.com/users/nao37/repos","events_url":"https://api.github.com/users/nao37/events{/privacy}","received_events_url":"https://api.github.com/users/nao37/received_events","type":"User","site_admin":false},"repo":{"id":95520696,"name":"chat-space","full_name":"nao37/chat-space","owner":{"login":"nao37","id":29706324,"avatar_url":"https://avatars1.githubusercontent.com/u/29706324?v=3","gravatar_id":"","url":"https://api.github.com/users/nao37","html_url":"https://github.com/nao37","followers_url":"https://api.github.com/users/nao37/followers","following_url":"https://api.github.com/users/nao37/following{/other_user}","gists_url":"https://api.github.com/users/nao37/gists{/gist_id}","starred_url":"https://api.github.com/users/nao37/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nao37/subscriptions","organizations_url":"https://api.github.com/users/nao37/orgs","repos_url":"https://api.github.com/users/nao37/repos","events_url":"https://api.github.com/users/nao37/events{/privacy}","received_events_url":"https://api.github.com/users/nao37/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nao37/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/nao37/chat-space","forks_url":"https://api.github.com/repos/nao37/chat-space/forks","keys_url":"https://api.github.com/repos/nao37/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nao37/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nao37/chat-space/teams","hooks_url":"https://api.github.com/repos/nao37/chat-space/hooks","issue_events_url":"https://api.github.com/repos/nao37/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/nao37/chat-space/events","assignees_url":"https://api.github.com/repos/nao37/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/nao37/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/nao37/chat-space/tags","blobs_url":"https://api.github.com/repos/nao37/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nao37/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nao37/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/nao37/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nao37/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/nao37/chat-space/languages","stargazers_url":"https://api.github.com/repos/nao37/chat-space/stargazers","contributors_url":"https://api.github.com/repos/nao37/chat-space/contributors","subscribers_url":"https://api.github.com/repos/nao37/chat-space/subscribers","subscription_url":"https://api.github.com/repos/nao37/chat-space/subscription","commits_url":"https://api.github.com/repos/nao37/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/nao37/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/nao37/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/nao37/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/nao37/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/nao37/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nao37/chat-space/merges","archive_url":"https://api.github.com/repos/nao37/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nao37/chat-space/downloads","issues_url":"https://api.github.com/repos/nao37/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/nao37/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/nao37/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/nao37/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nao37/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/nao37/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/nao37/chat-space/deployments","created_at":"2017-06-27T05:26:40Z","updated_at":"2017-06-29T03:22:22Z","pushed_at":"2017-07-06T02:36:41Z","git_url":"git://github.com/nao37/chat-space.git","ssh_url":"git@github.com:nao37/chat-space.git","clone_url":"https://github.com/nao37/chat-space.git","svn_url":"https://github.com/nao37/chat-space","homepage":"","size":98,"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/nao37/chat-space/pulls/14"},"html":{"href":"https://github.com/nao37/chat-space/pull/14"},"issue":{"href":"https://api.github.com/repos/nao37/chat-space/issues/14"},"comments":{"href":"https://api.github.com/repos/nao37/chat-space/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/nao37/chat-space/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/nao37/chat-space/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nao37/chat-space/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/nao37/chat-space/statuses/0f42cc0b06d657bb9ec5effb1c03af1983b0c32f"}}}}
{"actor":{"display_login":"maiki055"}}