{"action":"created","comment":{"url":"https://api.github.com/repos/mottu117/chat-space/pulls/comments/93814960","pull_request_review_id":14351491,"id":93814960,"diff_hunk":"@@ -17,9 +24,34 @@ def create\n         end\n     end\n \n+    def edit\n+      @edit_target_group = Group.includes(:groups_users).find(group_edit_target_id)\n+      # binding.pry\n+    end\n+\n+    def update\n+      @group = Group.find(group_edit_target_id)\n+\n+      if @group.update(group_params)\n+          redirect_to root_path, notice: 'グループを編集しました。'\n+\n+      else\n+          redirect_to root_path, alert: 'グループを編集できませんでした。'\n+\n+      end\n+\n+    end\n+\n+\n+\n     private\n \n     def group_params\n         params.require(:group).permit(:group_name, user_ids: [])\n     end\n+\n+    def group_edit_target_id\n+        params.require(:id)","path":"app/controllers/groups_controller.rb","position":45,"original_position":45,"commit_id":"b28b041750bdb46f656d43fb5a4b2c59224fdd93","original_commit_id":"b28b041750bdb46f656d43fb5a4b2c59224fdd93","user":{"login":"FumiyaMori","id":13659919,"avatar_url":"https://avatars.githubusercontent.com/u/13659919?v=3","gravatar_id":"","url":"https://api.github.com/users/FumiyaMori","html_url":"https://github.com/FumiyaMori","followers_url":"https://api.github.com/users/FumiyaMori/followers","following_url":"https://api.github.com/users/FumiyaMori/following{/other_user}","gists_url":"https://api.github.com/users/FumiyaMori/gists{/gist_id}","starred_url":"https://api.github.com/users/FumiyaMori/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FumiyaMori/subscriptions","organizations_url":"https://api.github.com/users/FumiyaMori/orgs","repos_url":"https://api.github.com/users/FumiyaMori/repos","events_url":"https://api.github.com/users/FumiyaMori/events{/privacy}","received_events_url":"https://api.github.com/users/FumiyaMori/received_events","type":"User","site_admin":false},"body":"このidはルーティングの設定によりurl中に含まれているものだと思います。ですのでストロングパラメータとする必要はないと思います。","created_at":"2016-12-24T09:11:40Z","updated_at":"2016-12-24T09:18:49Z","html_url":"https://github.com/mottu117/chat-space/pull/17#discussion_r93814960","pull_request_url":"https://api.github.com/repos/mottu117/chat-space/pulls/17","_links":{"self":{"href":"https://api.github.com/repos/mottu117/chat-space/pulls/comments/93814960"},"html":{"href":"https://github.com/mottu117/chat-space/pull/17#discussion_r93814960"},"pull_request":{"href":"https://api.github.com/repos/mottu117/chat-space/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/mottu117/chat-space/pulls/17","id":99293823,"html_url":"https://github.com/mottu117/chat-space/pull/17","diff_url":"https://github.com/mottu117/chat-space/pull/17.diff","patch_url":"https://github.com/mottu117/chat-space/pull/17.patch","issue_url":"https://api.github.com/repos/mottu117/chat-space/issues/17","number":17,"state":"open","locked":false,"title":"add_group_control_edit","user":{"login":"mottu117","id":24289024,"avatar_url":"https://avatars.githubusercontent.com/u/24289024?v=3","gravatar_id":"","url":"https://api.github.com/users/mottu117","html_url":"https://github.com/mottu117","followers_url":"https://api.github.com/users/mottu117/followers","following_url":"https://api.github.com/users/mottu117/following{/other_user}","gists_url":"https://api.github.com/users/mottu117/gists{/gist_id}","starred_url":"https://api.github.com/users/mottu117/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mottu117/subscriptions","organizations_url":"https://api.github.com/users/mottu117/orgs","repos_url":"https://api.github.com/users/mottu117/repos","events_url":"https://api.github.com/users/mottu117/events{/privacy}","received_events_url":"https://api.github.com/users/mottu117/received_events","type":"User","site_admin":false},"body":"# what\r\n  add function [edit]\r\n\r\n# why\r\n  practice group_control\r\n  http://master.tech-camp.in/expert/curriculums/1189","created_at":"2016-12-24T03:16:54Z","updated_at":"2016-12-24T09:18:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c84cf64243b198b538b87aca4d6e85f966072c3","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mottu117/chat-space/pulls/17/commits","review_comments_url":"https://api.github.com/repos/mottu117/chat-space/pulls/17/comments","review_comment_url":"https://api.github.com/repos/mottu117/chat-space/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mottu117/chat-space/issues/17/comments","statuses_url":"https://api.github.com/repos/mottu117/chat-space/statuses/b28b041750bdb46f656d43fb5a4b2c59224fdd93","head":{"label":"mottu117:add_group_control_edit","ref":"add_group_control_edit","sha":"b28b041750bdb46f656d43fb5a4b2c59224fdd93","user":{"login":"mottu117","id":24289024,"avatar_url":"https://avatars.githubusercontent.com/u/24289024?v=3","gravatar_id":"","url":"https://api.github.com/users/mottu117","html_url":"https://github.com/mottu117","followers_url":"https://api.github.com/users/mottu117/followers","following_url":"https://api.github.com/users/mottu117/following{/other_user}","gists_url":"https://api.github.com/users/mottu117/gists{/gist_id}","starred_url":"https://api.github.com/users/mottu117/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mottu117/subscriptions","organizations_url":"https://api.github.com/users/mottu117/orgs","repos_url":"https://api.github.com/users/mottu117/repos","events_url":"https://api.github.com/users/mottu117/events{/privacy}","received_events_url":"https://api.github.com/users/mottu117/received_events","type":"User","site_admin":false},"repo":{"id":75358199,"name":"chat-space","full_name":"mottu117/chat-space","owner":{"login":"mottu117","id":24289024,"avatar_url":"https://avatars.githubusercontent.com/u/24289024?v=3","gravatar_id":"","url":"https://api.github.com/users/mottu117","html_url":"https://github.com/mottu117","followers_url":"https://api.github.com/users/mottu117/followers","following_url":"https://api.github.com/users/mottu117/following{/other_user}","gists_url":"https://api.github.com/users/mottu117/gists{/gist_id}","starred_url":"https://api.github.com/users/mottu117/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mottu117/subscriptions","organizations_url":"https://api.github.com/users/mottu117/orgs","repos_url":"https://api.github.com/users/mottu117/repos","events_url":"https://api.github.com/users/mottu117/events{/privacy}","received_events_url":"https://api.github.com/users/mottu117/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mottu117/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/mottu117/chat-space","forks_url":"https://api.github.com/repos/mottu117/chat-space/forks","keys_url":"https://api.github.com/repos/mottu117/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mottu117/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mottu117/chat-space/teams","hooks_url":"https://api.github.com/repos/mottu117/chat-space/hooks","issue_events_url":"https://api.github.com/repos/mottu117/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/mottu117/chat-space/events","assignees_url":"https://api.github.com/repos/mottu117/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/mottu117/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/mottu117/chat-space/tags","blobs_url":"https://api.github.com/repos/mottu117/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mottu117/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mottu117/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/mottu117/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mottu117/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/mottu117/chat-space/languages","stargazers_url":"https://api.github.com/repos/mottu117/chat-space/stargazers","contributors_url":"https://api.github.com/repos/mottu117/chat-space/contributors","subscribers_url":"https://api.github.com/repos/mottu117/chat-space/subscribers","subscription_url":"https://api.github.com/repos/mottu117/chat-space/subscription","commits_url":"https://api.github.com/repos/mottu117/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/mottu117/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/mottu117/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/mottu117/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/mottu117/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/mottu117/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mottu117/chat-space/merges","archive_url":"https://api.github.com/repos/mottu117/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mottu117/chat-space/downloads","issues_url":"https://api.github.com/repos/mottu117/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/mottu117/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/mottu117/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/mottu117/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mottu117/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/mottu117/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/mottu117/chat-space/deployments","created_at":"2016-12-02T03:46:12Z","updated_at":"2016-12-02T03:46:20Z","pushed_at":"2016-12-24T08:53:54Z","git_url":"git://github.com/mottu117/chat-space.git","ssh_url":"git@github.com:mottu117/chat-space.git","clone_url":"https://github.com/mottu117/chat-space.git","svn_url":"https://github.com/mottu117/chat-space","homepage":null,"size":94,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":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":"mottu117:master","ref":"master","sha":"be2f3d16c5e3bce601609ec42028641c9651cdb9","user":{"login":"mottu117","id":24289024,"avatar_url":"https://avatars.githubusercontent.com/u/24289024?v=3","gravatar_id":"","url":"https://api.github.com/users/mottu117","html_url":"https://github.com/mottu117","followers_url":"https://api.github.com/users/mottu117/followers","following_url":"https://api.github.com/users/mottu117/following{/other_user}","gists_url":"https://api.github.com/users/mottu117/gists{/gist_id}","starred_url":"https://api.github.com/users/mottu117/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mottu117/subscriptions","organizations_url":"https://api.github.com/users/mottu117/orgs","repos_url":"https://api.github.com/users/mottu117/repos","events_url":"https://api.github.com/users/mottu117/events{/privacy}","received_events_url":"https://api.github.com/users/mottu117/received_events","type":"User","site_admin":false},"repo":{"id":75358199,"name":"chat-space","full_name":"mottu117/chat-space","owner":{"login":"mottu117","id":24289024,"avatar_url":"https://avatars.githubusercontent.com/u/24289024?v=3","gravatar_id":"","url":"https://api.github.com/users/mottu117","html_url":"https://github.com/mottu117","followers_url":"https://api.github.com/users/mottu117/followers","following_url":"https://api.github.com/users/mottu117/following{/other_user}","gists_url":"https://api.github.com/users/mottu117/gists{/gist_id}","starred_url":"https://api.github.com/users/mottu117/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mottu117/subscriptions","organizations_url":"https://api.github.com/users/mottu117/orgs","repos_url":"https://api.github.com/users/mottu117/repos","events_url":"https://api.github.com/users/mottu117/events{/privacy}","received_events_url":"https://api.github.com/users/mottu117/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mottu117/chat-space","description":null,"fork":false,"url":"https://api.github.com/repos/mottu117/chat-space","forks_url":"https://api.github.com/repos/mottu117/chat-space/forks","keys_url":"https://api.github.com/repos/mottu117/chat-space/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mottu117/chat-space/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mottu117/chat-space/teams","hooks_url":"https://api.github.com/repos/mottu117/chat-space/hooks","issue_events_url":"https://api.github.com/repos/mottu117/chat-space/issues/events{/number}","events_url":"https://api.github.com/repos/mottu117/chat-space/events","assignees_url":"https://api.github.com/repos/mottu117/chat-space/assignees{/user}","branches_url":"https://api.github.com/repos/mottu117/chat-space/branches{/branch}","tags_url":"https://api.github.com/repos/mottu117/chat-space/tags","blobs_url":"https://api.github.com/repos/mottu117/chat-space/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mottu117/chat-space/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mottu117/chat-space/git/refs{/sha}","trees_url":"https://api.github.com/repos/mottu117/chat-space/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mottu117/chat-space/statuses/{sha}","languages_url":"https://api.github.com/repos/mottu117/chat-space/languages","stargazers_url":"https://api.github.com/repos/mottu117/chat-space/stargazers","contributors_url":"https://api.github.com/repos/mottu117/chat-space/contributors","subscribers_url":"https://api.github.com/repos/mottu117/chat-space/subscribers","subscription_url":"https://api.github.com/repos/mottu117/chat-space/subscription","commits_url":"https://api.github.com/repos/mottu117/chat-space/commits{/sha}","git_commits_url":"https://api.github.com/repos/mottu117/chat-space/git/commits{/sha}","comments_url":"https://api.github.com/repos/mottu117/chat-space/comments{/number}","issue_comment_url":"https://api.github.com/repos/mottu117/chat-space/issues/comments{/number}","contents_url":"https://api.github.com/repos/mottu117/chat-space/contents/{+path}","compare_url":"https://api.github.com/repos/mottu117/chat-space/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mottu117/chat-space/merges","archive_url":"https://api.github.com/repos/mottu117/chat-space/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mottu117/chat-space/downloads","issues_url":"https://api.github.com/repos/mottu117/chat-space/issues{/number}","pulls_url":"https://api.github.com/repos/mottu117/chat-space/pulls{/number}","milestones_url":"https://api.github.com/repos/mottu117/chat-space/milestones{/number}","notifications_url":"https://api.github.com/repos/mottu117/chat-space/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mottu117/chat-space/labels{/name}","releases_url":"https://api.github.com/repos/mottu117/chat-space/releases{/id}","deployments_url":"https://api.github.com/repos/mottu117/chat-space/deployments","created_at":"2016-12-02T03:46:12Z","updated_at":"2016-12-02T03:46:20Z","pushed_at":"2016-12-24T08:53:54Z","git_url":"git://github.com/mottu117/chat-space.git","ssh_url":"git@github.com:mottu117/chat-space.git","clone_url":"https://github.com/mottu117/chat-space.git","svn_url":"https://github.com/mottu117/chat-space","homepage":null,"size":94,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":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/mottu117/chat-space/pulls/17"},"html":{"href":"https://github.com/mottu117/chat-space/pull/17"},"issue":{"href":"https://api.github.com/repos/mottu117/chat-space/issues/17"},"comments":{"href":"https://api.github.com/repos/mottu117/chat-space/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/mottu117/chat-space/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/mottu117/chat-space/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mottu117/chat-space/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/mottu117/chat-space/statuses/b28b041750bdb46f656d43fb5a4b2c59224fdd93"}}}}
{"actor":{"display_login":"FumiyaMori"}}