{"action":"created","comment":{"url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/pulls/comments/192277197","pull_request_review_id":125022595,"id":192277197,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjI3NzE5Nw==","diff_hunk":"@@ -1,14 +1,16 @@\n class LikesController < ApplicationController\n-  before_action :logged_in_user\n \n   def create\n-    @prototype = Prototype.find(params[:prototype_id])\n-    @prototype.good(current_user)\n+   @like = Like.create(user_id: current_user.id, prototype_id: params[:prototype_id])\n+   @likes = Like.where(prototype_id: params[:prototype_id])","path":"app/controllers/likes_controller.rb","position":8,"original_position":8,"commit_id":"4318279a680c042c85386b7676e06dacf3de0b1c","original_commit_id":"4318279a680c042c85386b7676e06dacf3de0b1c","user":{"login":"KosaburoKaneko","id":33095006,"node_id":"MDQ6VXNlcjMzMDk1MDA2","avatar_url":"https://avatars2.githubusercontent.com/u/33095006?v=4","gravatar_id":"","url":"https://api.github.com/users/KosaburoKaneko","html_url":"https://github.com/KosaburoKaneko","followers_url":"https://api.github.com/users/KosaburoKaneko/followers","following_url":"https://api.github.com/users/KosaburoKaneko/following{/other_user}","gists_url":"https://api.github.com/users/KosaburoKaneko/gists{/gist_id}","starred_url":"https://api.github.com/users/KosaburoKaneko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KosaburoKaneko/subscriptions","organizations_url":"https://api.github.com/users/KosaburoKaneko/orgs","repos_url":"https://api.github.com/users/KosaburoKaneko/repos","events_url":"https://api.github.com/users/KosaburoKaneko/events{/privacy}","received_events_url":"https://api.github.com/users/KosaburoKaneko/received_events","type":"User","site_admin":false},"body":"destroyメソッドと重複しているので、メソッドに切り出せると思います！\r\n","created_at":"2018-06-01T01:01:55Z","updated_at":"2018-06-01T01:02:56Z","html_url":"https://github.com/KosaburoKaneko/protospace_in_dev/pull/6#discussion_r192277197","pull_request_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/pulls/6","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/pulls/comments/192277197"},"html":{"href":"https://github.com/KosaburoKaneko/protospace_in_dev/pull/6#discussion_r192277197"},"pull_request":{"href":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/pulls/6","id":191905734,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxOTA1NzM0","html_url":"https://github.com/KosaburoKaneko/protospace_in_dev/pull/6","diff_url":"https://github.com/KosaburoKaneko/protospace_in_dev/pull/6.diff","patch_url":"https://github.com/KosaburoKaneko/protospace_in_dev/pull/6.patch","issue_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/issues/6","number":6,"state":"open","locked":false,"title":"like機能の実装","user":{"login":"matsushitashuhei","id":38846355,"node_id":"MDQ6VXNlcjM4ODQ2MzU1","avatar_url":"https://avatars0.githubusercontent.com/u/38846355?v=4","gravatar_id":"","url":"https://api.github.com/users/matsushitashuhei","html_url":"https://github.com/matsushitashuhei","followers_url":"https://api.github.com/users/matsushitashuhei/followers","following_url":"https://api.github.com/users/matsushitashuhei/following{/other_user}","gists_url":"https://api.github.com/users/matsushitashuhei/gists{/gist_id}","starred_url":"https://api.github.com/users/matsushitashuhei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matsushitashuhei/subscriptions","organizations_url":"https://api.github.com/users/matsushitashuhei/orgs","repos_url":"https://api.github.com/users/matsushitashuhei/repos","events_url":"https://api.github.com/users/matsushitashuhei/events{/privacy}","received_events_url":"https://api.github.com/users/matsushitashuhei/received_events","type":"User","site_admin":false},"body":"# What\r\nLike機能を実装する。\r\n\r\n# Why\r\n必須の機能であるため。\r\n\r\n### P.S.\r\n作業スケジュールの都合上、Ajax処理の実装は後回しにしました。","created_at":"2018-06-01T00:21:14Z","updated_at":"2018-06-01T01:02:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8421678679bd58ccae9ee602dff90fe469765b2","assignee":null,"assignees":[],"requested_reviewers":[{"login":"ryosuke071111","id":38237068,"node_id":"MDQ6VXNlcjM4MjM3MDY4","avatar_url":"https://avatars0.githubusercontent.com/u/38237068?v=4","gravatar_id":"","url":"https://api.github.com/users/ryosuke071111","html_url":"https://github.com/ryosuke071111","followers_url":"https://api.github.com/users/ryosuke071111/followers","following_url":"https://api.github.com/users/ryosuke071111/following{/other_user}","gists_url":"https://api.github.com/users/ryosuke071111/gists{/gist_id}","starred_url":"https://api.github.com/users/ryosuke071111/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryosuke071111/subscriptions","organizations_url":"https://api.github.com/users/ryosuke071111/orgs","repos_url":"https://api.github.com/users/ryosuke071111/repos","events_url":"https://api.github.com/users/ryosuke071111/events{/privacy}","received_events_url":"https://api.github.com/users/ryosuke071111/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/pulls/6/commits","review_comments_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/pulls/6/comments","review_comment_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/issues/6/comments","statuses_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/statuses/4318279a680c042c85386b7676e06dacf3de0b1c","head":{"label":"KosaburoKaneko:add-like-function","ref":"add-like-function","sha":"4318279a680c042c85386b7676e06dacf3de0b1c","user":{"login":"KosaburoKaneko","id":33095006,"node_id":"MDQ6VXNlcjMzMDk1MDA2","avatar_url":"https://avatars2.githubusercontent.com/u/33095006?v=4","gravatar_id":"","url":"https://api.github.com/users/KosaburoKaneko","html_url":"https://github.com/KosaburoKaneko","followers_url":"https://api.github.com/users/KosaburoKaneko/followers","following_url":"https://api.github.com/users/KosaburoKaneko/following{/other_user}","gists_url":"https://api.github.com/users/KosaburoKaneko/gists{/gist_id}","starred_url":"https://api.github.com/users/KosaburoKaneko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KosaburoKaneko/subscriptions","organizations_url":"https://api.github.com/users/KosaburoKaneko/orgs","repos_url":"https://api.github.com/users/KosaburoKaneko/repos","events_url":"https://api.github.com/users/KosaburoKaneko/events{/privacy}","received_events_url":"https://api.github.com/users/KosaburoKaneko/received_events","type":"User","site_admin":false},"repo":{"id":134033181,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQwMzMxODE=","name":"protospace_in_dev","full_name":"KosaburoKaneko/protospace_in_dev","owner":{"login":"KosaburoKaneko","id":33095006,"node_id":"MDQ6VXNlcjMzMDk1MDA2","avatar_url":"https://avatars2.githubusercontent.com/u/33095006?v=4","gravatar_id":"","url":"https://api.github.com/users/KosaburoKaneko","html_url":"https://github.com/KosaburoKaneko","followers_url":"https://api.github.com/users/KosaburoKaneko/followers","following_url":"https://api.github.com/users/KosaburoKaneko/following{/other_user}","gists_url":"https://api.github.com/users/KosaburoKaneko/gists{/gist_id}","starred_url":"https://api.github.com/users/KosaburoKaneko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KosaburoKaneko/subscriptions","organizations_url":"https://api.github.com/users/KosaburoKaneko/orgs","repos_url":"https://api.github.com/users/KosaburoKaneko/repos","events_url":"https://api.github.com/users/KosaburoKaneko/events{/privacy}","received_events_url":"https://api.github.com/users/KosaburoKaneko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KosaburoKaneko/protospace_in_dev","description":null,"fork":false,"url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev","forks_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/forks","keys_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/teams","hooks_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/hooks","issue_events_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/issues/events{/number}","events_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/events","assignees_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/assignees{/user}","branches_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/branches{/branch}","tags_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/tags","blobs_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/statuses/{sha}","languages_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/languages","stargazers_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/stargazers","contributors_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/contributors","subscribers_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/subscribers","subscription_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/subscription","commits_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/contents/{+path}","compare_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/merges","archive_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/downloads","issues_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/issues{/number}","pulls_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/pulls{/number}","milestones_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/milestones{/number}","notifications_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/labels{/name}","releases_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/releases{/id}","deployments_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/deployments","created_at":"2018-05-19T05:38:30Z","updated_at":"2018-06-01T00:12:58Z","pushed_at":"2018-06-01T00:21:15Z","git_url":"git://github.com/KosaburoKaneko/protospace_in_dev.git","ssh_url":"git@github.com:KosaburoKaneko/protospace_in_dev.git","clone_url":"https://github.com/KosaburoKaneko/protospace_in_dev.git","svn_url":"https://github.com/KosaburoKaneko/protospace_in_dev","homepage":null,"size":595,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"KosaburoKaneko:master","ref":"master","sha":"e652e0dc78782d909a7d687442b370bfd72d2861","user":{"login":"KosaburoKaneko","id":33095006,"node_id":"MDQ6VXNlcjMzMDk1MDA2","avatar_url":"https://avatars2.githubusercontent.com/u/33095006?v=4","gravatar_id":"","url":"https://api.github.com/users/KosaburoKaneko","html_url":"https://github.com/KosaburoKaneko","followers_url":"https://api.github.com/users/KosaburoKaneko/followers","following_url":"https://api.github.com/users/KosaburoKaneko/following{/other_user}","gists_url":"https://api.github.com/users/KosaburoKaneko/gists{/gist_id}","starred_url":"https://api.github.com/users/KosaburoKaneko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KosaburoKaneko/subscriptions","organizations_url":"https://api.github.com/users/KosaburoKaneko/orgs","repos_url":"https://api.github.com/users/KosaburoKaneko/repos","events_url":"https://api.github.com/users/KosaburoKaneko/events{/privacy}","received_events_url":"https://api.github.com/users/KosaburoKaneko/received_events","type":"User","site_admin":false},"repo":{"id":134033181,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQwMzMxODE=","name":"protospace_in_dev","full_name":"KosaburoKaneko/protospace_in_dev","owner":{"login":"KosaburoKaneko","id":33095006,"node_id":"MDQ6VXNlcjMzMDk1MDA2","avatar_url":"https://avatars2.githubusercontent.com/u/33095006?v=4","gravatar_id":"","url":"https://api.github.com/users/KosaburoKaneko","html_url":"https://github.com/KosaburoKaneko","followers_url":"https://api.github.com/users/KosaburoKaneko/followers","following_url":"https://api.github.com/users/KosaburoKaneko/following{/other_user}","gists_url":"https://api.github.com/users/KosaburoKaneko/gists{/gist_id}","starred_url":"https://api.github.com/users/KosaburoKaneko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KosaburoKaneko/subscriptions","organizations_url":"https://api.github.com/users/KosaburoKaneko/orgs","repos_url":"https://api.github.com/users/KosaburoKaneko/repos","events_url":"https://api.github.com/users/KosaburoKaneko/events{/privacy}","received_events_url":"https://api.github.com/users/KosaburoKaneko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KosaburoKaneko/protospace_in_dev","description":null,"fork":false,"url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev","forks_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/forks","keys_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/teams","hooks_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/hooks","issue_events_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/issues/events{/number}","events_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/events","assignees_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/assignees{/user}","branches_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/branches{/branch}","tags_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/tags","blobs_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/statuses/{sha}","languages_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/languages","stargazers_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/stargazers","contributors_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/contributors","subscribers_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/subscribers","subscription_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/subscription","commits_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/contents/{+path}","compare_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/merges","archive_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/downloads","issues_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/issues{/number}","pulls_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/pulls{/number}","milestones_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/milestones{/number}","notifications_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/labels{/name}","releases_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/releases{/id}","deployments_url":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/deployments","created_at":"2018-05-19T05:38:30Z","updated_at":"2018-06-01T00:12:58Z","pushed_at":"2018-06-01T00:21:15Z","git_url":"git://github.com/KosaburoKaneko/protospace_in_dev.git","ssh_url":"git@github.com:KosaburoKaneko/protospace_in_dev.git","clone_url":"https://github.com/KosaburoKaneko/protospace_in_dev.git","svn_url":"https://github.com/KosaburoKaneko/protospace_in_dev","homepage":null,"size":595,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/pulls/6"},"html":{"href":"https://github.com/KosaburoKaneko/protospace_in_dev/pull/6"},"issue":{"href":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/issues/6"},"comments":{"href":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/KosaburoKaneko/protospace_in_dev/statuses/4318279a680c042c85386b7676e06dacf3de0b1c"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"KosaburoKaneko"}}