{"action":"created","comment":{"url":"https://api.github.com/repos/Terunaga/Chat-Space/pulls/comments/104302778","pull_request_review_id":25137527,"id":104302778,"diff_hunk":"@@ -4,13 +4,21 @@ class Groups::MessagesController < ApplicationController\n   def index\n     @groups   = current_user.groups.order_by_desc\n     @message  = Message.new\n-    @messages = @group.messages.order_by_desc\n+    @messages = @group.messages.order_by_asc\n   end\n \n   def create\n     message = current_user.messages.build(create_params)\n     if message.save\n-      redirect_to group_messages_path(@group), notice: 'Message was successfully posted.'\n+      respond_to do |format|\n+        format.html {\n+          redirect_to group_messages_path(@group),\n+          notice: 'Message was successfully posted.'\n+        }\n+        format.json {\n+          render json: message\n+        }\n+      end\n     else\n       redirect_to group_messages_path(@group), alert: message.errors.full_messages.join('')","path":"app/controllers/groups/messages_controller.rb","position":22,"original_position":22,"commit_id":"306b6d4a218a6169427e0da4f0f86c23c606aafe","original_commit_id":"306b6d4a218a6169427e0da4f0f86c23c606aafe","user":{"login":"narukami894","id":20283700,"avatar_url":"https://avatars0.githubusercontent.com/u/20283700?v=3","gravatar_id":"","url":"https://api.github.com/users/narukami894","html_url":"https://github.com/narukami894","followers_url":"https://api.github.com/users/narukami894/followers","following_url":"https://api.github.com/users/narukami894/following{/other_user}","gists_url":"https://api.github.com/users/narukami894/gists{/gist_id}","starred_url":"https://api.github.com/users/narukami894/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narukami894/subscriptions","organizations_url":"https://api.github.com/users/narukami894/orgs","repos_url":"https://api.github.com/users/narukami894/repos","events_url":"https://api.github.com/users/narukami894/events{/privacy}","received_events_url":"https://api.github.com/users/narukami894/received_events","type":"User","site_admin":false},"body":"ここmessage.jsの部分とかぶっちゃいますね","created_at":"2017-03-05T03:08:13Z","updated_at":"2017-03-05T03:08:13Z","html_url":"https://github.com/Terunaga/Chat-Space/pull/11#discussion_r104302778","pull_request_url":"https://api.github.com/repos/Terunaga/Chat-Space/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/Terunaga/Chat-Space/pulls/comments/104302778"},"html":{"href":"https://github.com/Terunaga/Chat-Space/pull/11#discussion_r104302778"},"pull_request":{"href":"https://api.github.com/repos/Terunaga/Chat-Space/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/Terunaga/Chat-Space/pulls/11","id":109133121,"html_url":"https://github.com/Terunaga/Chat-Space/pull/11","diff_url":"https://github.com/Terunaga/Chat-Space/pull/11.diff","patch_url":"https://github.com/Terunaga/Chat-Space/pull/11.patch","issue_url":"https://api.github.com/repos/Terunaga/Chat-Space/issues/11","number":11,"state":"open","locked":false,"title":"【WIP】Implement ajax message","user":{"login":"Terunaga","id":13899346,"avatar_url":"https://avatars2.githubusercontent.com/u/13899346?v=3","gravatar_id":"","url":"https://api.github.com/users/Terunaga","html_url":"https://github.com/Terunaga","followers_url":"https://api.github.com/users/Terunaga/followers","following_url":"https://api.github.com/users/Terunaga/following{/other_user}","gists_url":"https://api.github.com/users/Terunaga/gists{/gist_id}","starred_url":"https://api.github.com/users/Terunaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Terunaga/subscriptions","organizations_url":"https://api.github.com/users/Terunaga/orgs","repos_url":"https://api.github.com/users/Terunaga/repos","events_url":"https://api.github.com/users/Terunaga/events{/privacy}","received_events_url":"https://api.github.com/users/Terunaga/received_events","type":"User","site_admin":false},"body":"# What\r\n非同期でメッセージを表示する。\r\n\r\n# Why\r\nページの遷移なしでメッセージを表示したいた。","created_at":"2017-03-05T02:59:41Z","updated_at":"2017-03-05T03:08:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37b5d46c6abdb1d8f84d7d45ccbe50d2d1f3e11b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Terunaga/Chat-Space/pulls/11/commits","review_comments_url":"https://api.github.com/repos/Terunaga/Chat-Space/pulls/11/comments","review_comment_url":"https://api.github.com/repos/Terunaga/Chat-Space/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Terunaga/Chat-Space/issues/11/comments","statuses_url":"https://api.github.com/repos/Terunaga/Chat-Space/statuses/306b6d4a218a6169427e0da4f0f86c23c606aafe","head":{"label":"Terunaga:implement_ajax_message","ref":"implement_ajax_message","sha":"306b6d4a218a6169427e0da4f0f86c23c606aafe","user":{"login":"Terunaga","id":13899346,"avatar_url":"https://avatars2.githubusercontent.com/u/13899346?v=3","gravatar_id":"","url":"https://api.github.com/users/Terunaga","html_url":"https://github.com/Terunaga","followers_url":"https://api.github.com/users/Terunaga/followers","following_url":"https://api.github.com/users/Terunaga/following{/other_user}","gists_url":"https://api.github.com/users/Terunaga/gists{/gist_id}","starred_url":"https://api.github.com/users/Terunaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Terunaga/subscriptions","organizations_url":"https://api.github.com/users/Terunaga/orgs","repos_url":"https://api.github.com/users/Terunaga/repos","events_url":"https://api.github.com/users/Terunaga/events{/privacy}","received_events_url":"https://api.github.com/users/Terunaga/received_events","type":"User","site_admin":false},"repo":{"id":71686542,"name":"Chat-Space","full_name":"Terunaga/Chat-Space","owner":{"login":"Terunaga","id":13899346,"avatar_url":"https://avatars2.githubusercontent.com/u/13899346?v=3","gravatar_id":"","url":"https://api.github.com/users/Terunaga","html_url":"https://github.com/Terunaga","followers_url":"https://api.github.com/users/Terunaga/followers","following_url":"https://api.github.com/users/Terunaga/following{/other_user}","gists_url":"https://api.github.com/users/Terunaga/gists{/gist_id}","starred_url":"https://api.github.com/users/Terunaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Terunaga/subscriptions","organizations_url":"https://api.github.com/users/Terunaga/orgs","repos_url":"https://api.github.com/users/Terunaga/repos","events_url":"https://api.github.com/users/Terunaga/events{/privacy}","received_events_url":"https://api.github.com/users/Terunaga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Terunaga/Chat-Space","description":null,"fork":false,"url":"https://api.github.com/repos/Terunaga/Chat-Space","forks_url":"https://api.github.com/repos/Terunaga/Chat-Space/forks","keys_url":"https://api.github.com/repos/Terunaga/Chat-Space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Terunaga/Chat-Space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Terunaga/Chat-Space/teams","hooks_url":"https://api.github.com/repos/Terunaga/Chat-Space/hooks","issue_events_url":"https://api.github.com/repos/Terunaga/Chat-Space/issues/events{/number}","events_url":"https://api.github.com/repos/Terunaga/Chat-Space/events","assignees_url":"https://api.github.com/repos/Terunaga/Chat-Space/assignees{/user}","branches_url":"https://api.github.com/repos/Terunaga/Chat-Space/branches{/branch}","tags_url":"https://api.github.com/repos/Terunaga/Chat-Space/tags","blobs_url":"https://api.github.com/repos/Terunaga/Chat-Space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Terunaga/Chat-Space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Terunaga/Chat-Space/git/refs{/sha}","trees_url":"https://api.github.com/repos/Terunaga/Chat-Space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Terunaga/Chat-Space/statuses/{sha}","languages_url":"https://api.github.com/repos/Terunaga/Chat-Space/languages","stargazers_url":"https://api.github.com/repos/Terunaga/Chat-Space/stargazers","contributors_url":"https://api.github.com/repos/Terunaga/Chat-Space/contributors","subscribers_url":"https://api.github.com/repos/Terunaga/Chat-Space/subscribers","subscription_url":"https://api.github.com/repos/Terunaga/Chat-Space/subscription","commits_url":"https://api.github.com/repos/Terunaga/Chat-Space/commits{/sha}","git_commits_url":"https://api.github.com/repos/Terunaga/Chat-Space/git/commits{/sha}","comments_url":"https://api.github.com/repos/Terunaga/Chat-Space/comments{/number}","issue_comment_url":"https://api.github.com/repos/Terunaga/Chat-Space/issues/comments{/number}","contents_url":"https://api.github.com/repos/Terunaga/Chat-Space/contents/{+path}","compare_url":"https://api.github.com/repos/Terunaga/Chat-Space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Terunaga/Chat-Space/merges","archive_url":"https://api.github.com/repos/Terunaga/Chat-Space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Terunaga/Chat-Space/downloads","issues_url":"https://api.github.com/repos/Terunaga/Chat-Space/issues{/number}","pulls_url":"https://api.github.com/repos/Terunaga/Chat-Space/pulls{/number}","milestones_url":"https://api.github.com/repos/Terunaga/Chat-Space/milestones{/number}","notifications_url":"https://api.github.com/repos/Terunaga/Chat-Space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Terunaga/Chat-Space/labels{/name}","releases_url":"https://api.github.com/repos/Terunaga/Chat-Space/releases{/id}","deployments_url":"https://api.github.com/repos/Terunaga/Chat-Space/deployments","created_at":"2016-10-23T06:44:18Z","updated_at":"2016-10-23T06:45:32Z","pushed_at":"2017-03-05T02:59:41Z","git_url":"git://github.com/Terunaga/Chat-Space.git","ssh_url":"git@github.com:Terunaga/Chat-Space.git","clone_url":"https://github.com/Terunaga/Chat-Space.git","svn_url":"https://github.com/Terunaga/Chat-Space","homepage":null,"size":111,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Terunaga:master","ref":"master","sha":"e9c489db6b434aafcb552e7b023d041b00c872ca","user":{"login":"Terunaga","id":13899346,"avatar_url":"https://avatars2.githubusercontent.com/u/13899346?v=3","gravatar_id":"","url":"https://api.github.com/users/Terunaga","html_url":"https://github.com/Terunaga","followers_url":"https://api.github.com/users/Terunaga/followers","following_url":"https://api.github.com/users/Terunaga/following{/other_user}","gists_url":"https://api.github.com/users/Terunaga/gists{/gist_id}","starred_url":"https://api.github.com/users/Terunaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Terunaga/subscriptions","organizations_url":"https://api.github.com/users/Terunaga/orgs","repos_url":"https://api.github.com/users/Terunaga/repos","events_url":"https://api.github.com/users/Terunaga/events{/privacy}","received_events_url":"https://api.github.com/users/Terunaga/received_events","type":"User","site_admin":false},"repo":{"id":71686542,"name":"Chat-Space","full_name":"Terunaga/Chat-Space","owner":{"login":"Terunaga","id":13899346,"avatar_url":"https://avatars2.githubusercontent.com/u/13899346?v=3","gravatar_id":"","url":"https://api.github.com/users/Terunaga","html_url":"https://github.com/Terunaga","followers_url":"https://api.github.com/users/Terunaga/followers","following_url":"https://api.github.com/users/Terunaga/following{/other_user}","gists_url":"https://api.github.com/users/Terunaga/gists{/gist_id}","starred_url":"https://api.github.com/users/Terunaga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Terunaga/subscriptions","organizations_url":"https://api.github.com/users/Terunaga/orgs","repos_url":"https://api.github.com/users/Terunaga/repos","events_url":"https://api.github.com/users/Terunaga/events{/privacy}","received_events_url":"https://api.github.com/users/Terunaga/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Terunaga/Chat-Space","description":null,"fork":false,"url":"https://api.github.com/repos/Terunaga/Chat-Space","forks_url":"https://api.github.com/repos/Terunaga/Chat-Space/forks","keys_url":"https://api.github.com/repos/Terunaga/Chat-Space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Terunaga/Chat-Space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Terunaga/Chat-Space/teams","hooks_url":"https://api.github.com/repos/Terunaga/Chat-Space/hooks","issue_events_url":"https://api.github.com/repos/Terunaga/Chat-Space/issues/events{/number}","events_url":"https://api.github.com/repos/Terunaga/Chat-Space/events","assignees_url":"https://api.github.com/repos/Terunaga/Chat-Space/assignees{/user}","branches_url":"https://api.github.com/repos/Terunaga/Chat-Space/branches{/branch}","tags_url":"https://api.github.com/repos/Terunaga/Chat-Space/tags","blobs_url":"https://api.github.com/repos/Terunaga/Chat-Space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Terunaga/Chat-Space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Terunaga/Chat-Space/git/refs{/sha}","trees_url":"https://api.github.com/repos/Terunaga/Chat-Space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Terunaga/Chat-Space/statuses/{sha}","languages_url":"https://api.github.com/repos/Terunaga/Chat-Space/languages","stargazers_url":"https://api.github.com/repos/Terunaga/Chat-Space/stargazers","contributors_url":"https://api.github.com/repos/Terunaga/Chat-Space/contributors","subscribers_url":"https://api.github.com/repos/Terunaga/Chat-Space/subscribers","subscription_url":"https://api.github.com/repos/Terunaga/Chat-Space/subscription","commits_url":"https://api.github.com/repos/Terunaga/Chat-Space/commits{/sha}","git_commits_url":"https://api.github.com/repos/Terunaga/Chat-Space/git/commits{/sha}","comments_url":"https://api.github.com/repos/Terunaga/Chat-Space/comments{/number}","issue_comment_url":"https://api.github.com/repos/Terunaga/Chat-Space/issues/comments{/number}","contents_url":"https://api.github.com/repos/Terunaga/Chat-Space/contents/{+path}","compare_url":"https://api.github.com/repos/Terunaga/Chat-Space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Terunaga/Chat-Space/merges","archive_url":"https://api.github.com/repos/Terunaga/Chat-Space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Terunaga/Chat-Space/downloads","issues_url":"https://api.github.com/repos/Terunaga/Chat-Space/issues{/number}","pulls_url":"https://api.github.com/repos/Terunaga/Chat-Space/pulls{/number}","milestones_url":"https://api.github.com/repos/Terunaga/Chat-Space/milestones{/number}","notifications_url":"https://api.github.com/repos/Terunaga/Chat-Space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Terunaga/Chat-Space/labels{/name}","releases_url":"https://api.github.com/repos/Terunaga/Chat-Space/releases{/id}","deployments_url":"https://api.github.com/repos/Terunaga/Chat-Space/deployments","created_at":"2016-10-23T06:44:18Z","updated_at":"2016-10-23T06:45:32Z","pushed_at":"2017-03-05T02:59:41Z","git_url":"git://github.com/Terunaga/Chat-Space.git","ssh_url":"git@github.com:Terunaga/Chat-Space.git","clone_url":"https://github.com/Terunaga/Chat-Space.git","svn_url":"https://github.com/Terunaga/Chat-Space","homepage":null,"size":111,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Terunaga/Chat-Space/pulls/11"},"html":{"href":"https://github.com/Terunaga/Chat-Space/pull/11"},"issue":{"href":"https://api.github.com/repos/Terunaga/Chat-Space/issues/11"},"comments":{"href":"https://api.github.com/repos/Terunaga/Chat-Space/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/Terunaga/Chat-Space/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/Terunaga/Chat-Space/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Terunaga/Chat-Space/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/Terunaga/Chat-Space/statuses/306b6d4a218a6169427e0da4f0f86c23c606aafe"}}}}
{"actor":{"display_login":"narukami894"}}