{"action":"created","comment":{"url":"https://api.github.com/repos/tatsuki-m/protospace/pulls/comments/47432288","id":47432288,"diff_hunk":"@@ -0,0 +1,21 @@\n+class Prototypes::LikesController < ApplicationController\n+  before_action :set_prototype, only: :create\n+\n+  def create\n+    @prototype.likes.create(like_params)\n+  end\n+\n+  def destroy\n+    Like.find(params[:id]).destroy\n+    @prototype = Prototype.eager_load(:comments, { comments: :user }).find(params[:prototype_id])\n+  end\n+\n+  private\n+  def set_prototype\n+    @prototype = Prototype.eager_load(:comments, { comments: :user }).find(params[:prototype_id])\n+  end\n+\n+  def like_params\n+    params.permit(:user_id)","path":"app/controllers/prototypes/likes_controller.rb","position":19,"original_position":19,"commit_id":"afebad986863b5b0420015638febcaacc116bd8f","original_commit_id":"afebad986863b5b0420015638febcaacc116bd8f","user":{"login":"tatsuki-m","id":11342275,"avatar_url":"https://avatars.githubusercontent.com/u/11342275?v=3","gravatar_id":"","url":"https://api.github.com/users/tatsuki-m","html_url":"https://github.com/tatsuki-m","followers_url":"https://api.github.com/users/tatsuki-m/followers","following_url":"https://api.github.com/users/tatsuki-m/following{/other_user}","gists_url":"https://api.github.com/users/tatsuki-m/gists{/gist_id}","starred_url":"https://api.github.com/users/tatsuki-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatsuki-m/subscriptions","organizations_url":"https://api.github.com/users/tatsuki-m/orgs","repos_url":"https://api.github.com/users/tatsuki-m/repos","events_url":"https://api.github.com/users/tatsuki-m/events{/privacy}","received_events_url":"https://api.github.com/users/tatsuki-m/received_events","type":"User","site_admin":false},"body":"おけい！\r\n","created_at":"2015-12-12T14:38:26Z","updated_at":"2015-12-12T14:38:26Z","html_url":"https://github.com/tatsuki-m/protospace/pull/9#discussion_r47432288","pull_request_url":"https://api.github.com/repos/tatsuki-m/protospace/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/tatsuki-m/protospace/pulls/comments/47432288"},"html":{"href":"https://github.com/tatsuki-m/protospace/pull/9#discussion_r47432288"},"pull_request":{"href":"https://api.github.com/repos/tatsuki-m/protospace/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/tatsuki-m/protospace/pulls/9","id":53356600,"html_url":"https://github.com/tatsuki-m/protospace/pull/9","diff_url":"https://github.com/tatsuki-m/protospace/pull/9.diff","patch_url":"https://github.com/tatsuki-m/protospace/pull/9.patch","issue_url":"https://api.github.com/repos/tatsuki-m/protospace/issues/9","number":9,"state":"open","locked":false,"title":"Add comment & like function","user":{"login":"tatsuki-m","id":11342275,"avatar_url":"https://avatars.githubusercontent.com/u/11342275?v=3","gravatar_id":"","url":"https://api.github.com/users/tatsuki-m","html_url":"https://github.com/tatsuki-m","followers_url":"https://api.github.com/users/tatsuki-m/followers","following_url":"https://api.github.com/users/tatsuki-m/following{/other_user}","gists_url":"https://api.github.com/users/tatsuki-m/gists{/gist_id}","starred_url":"https://api.github.com/users/tatsuki-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatsuki-m/subscriptions","organizations_url":"https://api.github.com/users/tatsuki-m/orgs","repos_url":"https://api.github.com/users/tatsuki-m/repos","events_url":"https://api.github.com/users/tatsuki-m/events{/privacy}","received_events_url":"https://api.github.com/users/tatsuki-m/received_events","type":"User","site_admin":false},"body":"# WHY \r\n - user間のコミュニティのため\r\n\r\n# WHAT\r\n- comment機能の実装\r\n","created_at":"2015-12-11T05:59:11Z","updated_at":"2015-12-12T14:38:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d09b60a929dbf49742d0008e7b7c6a6f79a8d843","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/tatsuki-m/protospace/pulls/9/commits","review_comments_url":"https://api.github.com/repos/tatsuki-m/protospace/pulls/9/comments","review_comment_url":"https://api.github.com/repos/tatsuki-m/protospace/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tatsuki-m/protospace/issues/9/comments","statuses_url":"https://api.github.com/repos/tatsuki-m/protospace/statuses/afebad986863b5b0420015638febcaacc116bd8f","head":{"label":"tatsuki-m:add_comment_function","ref":"add_comment_function","sha":"afebad986863b5b0420015638febcaacc116bd8f","user":{"login":"tatsuki-m","id":11342275,"avatar_url":"https://avatars.githubusercontent.com/u/11342275?v=3","gravatar_id":"","url":"https://api.github.com/users/tatsuki-m","html_url":"https://github.com/tatsuki-m","followers_url":"https://api.github.com/users/tatsuki-m/followers","following_url":"https://api.github.com/users/tatsuki-m/following{/other_user}","gists_url":"https://api.github.com/users/tatsuki-m/gists{/gist_id}","starred_url":"https://api.github.com/users/tatsuki-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatsuki-m/subscriptions","organizations_url":"https://api.github.com/users/tatsuki-m/orgs","repos_url":"https://api.github.com/users/tatsuki-m/repos","events_url":"https://api.github.com/users/tatsuki-m/events{/privacy}","received_events_url":"https://api.github.com/users/tatsuki-m/received_events","type":"User","site_admin":false},"repo":{"id":47045713,"name":"protospace","full_name":"tatsuki-m/protospace","owner":{"login":"tatsuki-m","id":11342275,"avatar_url":"https://avatars.githubusercontent.com/u/11342275?v=3","gravatar_id":"","url":"https://api.github.com/users/tatsuki-m","html_url":"https://github.com/tatsuki-m","followers_url":"https://api.github.com/users/tatsuki-m/followers","following_url":"https://api.github.com/users/tatsuki-m/following{/other_user}","gists_url":"https://api.github.com/users/tatsuki-m/gists{/gist_id}","starred_url":"https://api.github.com/users/tatsuki-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatsuki-m/subscriptions","organizations_url":"https://api.github.com/users/tatsuki-m/orgs","repos_url":"https://api.github.com/users/tatsuki-m/repos","events_url":"https://api.github.com/users/tatsuki-m/events{/privacy}","received_events_url":"https://api.github.com/users/tatsuki-m/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tatsuki-m/protospace","description":"","fork":false,"url":"https://api.github.com/repos/tatsuki-m/protospace","forks_url":"https://api.github.com/repos/tatsuki-m/protospace/forks","keys_url":"https://api.github.com/repos/tatsuki-m/protospace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tatsuki-m/protospace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tatsuki-m/protospace/teams","hooks_url":"https://api.github.com/repos/tatsuki-m/protospace/hooks","issue_events_url":"https://api.github.com/repos/tatsuki-m/protospace/issues/events{/number}","events_url":"https://api.github.com/repos/tatsuki-m/protospace/events","assignees_url":"https://api.github.com/repos/tatsuki-m/protospace/assignees{/user}","branches_url":"https://api.github.com/repos/tatsuki-m/protospace/branches{/branch}","tags_url":"https://api.github.com/repos/tatsuki-m/protospace/tags","blobs_url":"https://api.github.com/repos/tatsuki-m/protospace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tatsuki-m/protospace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tatsuki-m/protospace/git/refs{/sha}","trees_url":"https://api.github.com/repos/tatsuki-m/protospace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tatsuki-m/protospace/statuses/{sha}","languages_url":"https://api.github.com/repos/tatsuki-m/protospace/languages","stargazers_url":"https://api.github.com/repos/tatsuki-m/protospace/stargazers","contributors_url":"https://api.github.com/repos/tatsuki-m/protospace/contributors","subscribers_url":"https://api.github.com/repos/tatsuki-m/protospace/subscribers","subscription_url":"https://api.github.com/repos/tatsuki-m/protospace/subscription","commits_url":"https://api.github.com/repos/tatsuki-m/protospace/commits{/sha}","git_commits_url":"https://api.github.com/repos/tatsuki-m/protospace/git/commits{/sha}","comments_url":"https://api.github.com/repos/tatsuki-m/protospace/comments{/number}","issue_comment_url":"https://api.github.com/repos/tatsuki-m/protospace/issues/comments{/number}","contents_url":"https://api.github.com/repos/tatsuki-m/protospace/contents/{+path}","compare_url":"https://api.github.com/repos/tatsuki-m/protospace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tatsuki-m/protospace/merges","archive_url":"https://api.github.com/repos/tatsuki-m/protospace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tatsuki-m/protospace/downloads","issues_url":"https://api.github.com/repos/tatsuki-m/protospace/issues{/number}","pulls_url":"https://api.github.com/repos/tatsuki-m/protospace/pulls{/number}","milestones_url":"https://api.github.com/repos/tatsuki-m/protospace/milestones{/number}","notifications_url":"https://api.github.com/repos/tatsuki-m/protospace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tatsuki-m/protospace/labels{/name}","releases_url":"https://api.github.com/repos/tatsuki-m/protospace/releases{/id}","created_at":"2015-11-29T01:28:09Z","updated_at":"2015-11-29T01:47:59Z","pushed_at":"2015-12-11T16:37:52Z","git_url":"git://github.com/tatsuki-m/protospace.git","ssh_url":"git@github.com:tatsuki-m/protospace.git","clone_url":"https://github.com/tatsuki-m/protospace.git","svn_url":"https://github.com/tatsuki-m/protospace","homepage":null,"size":594,"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":"tatsuki-m:master","ref":"master","sha":"61433fcd0d0d0a72c46da46261db3388bcb351ff","user":{"login":"tatsuki-m","id":11342275,"avatar_url":"https://avatars.githubusercontent.com/u/11342275?v=3","gravatar_id":"","url":"https://api.github.com/users/tatsuki-m","html_url":"https://github.com/tatsuki-m","followers_url":"https://api.github.com/users/tatsuki-m/followers","following_url":"https://api.github.com/users/tatsuki-m/following{/other_user}","gists_url":"https://api.github.com/users/tatsuki-m/gists{/gist_id}","starred_url":"https://api.github.com/users/tatsuki-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatsuki-m/subscriptions","organizations_url":"https://api.github.com/users/tatsuki-m/orgs","repos_url":"https://api.github.com/users/tatsuki-m/repos","events_url":"https://api.github.com/users/tatsuki-m/events{/privacy}","received_events_url":"https://api.github.com/users/tatsuki-m/received_events","type":"User","site_admin":false},"repo":{"id":47045713,"name":"protospace","full_name":"tatsuki-m/protospace","owner":{"login":"tatsuki-m","id":11342275,"avatar_url":"https://avatars.githubusercontent.com/u/11342275?v=3","gravatar_id":"","url":"https://api.github.com/users/tatsuki-m","html_url":"https://github.com/tatsuki-m","followers_url":"https://api.github.com/users/tatsuki-m/followers","following_url":"https://api.github.com/users/tatsuki-m/following{/other_user}","gists_url":"https://api.github.com/users/tatsuki-m/gists{/gist_id}","starred_url":"https://api.github.com/users/tatsuki-m/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatsuki-m/subscriptions","organizations_url":"https://api.github.com/users/tatsuki-m/orgs","repos_url":"https://api.github.com/users/tatsuki-m/repos","events_url":"https://api.github.com/users/tatsuki-m/events{/privacy}","received_events_url":"https://api.github.com/users/tatsuki-m/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tatsuki-m/protospace","description":"","fork":false,"url":"https://api.github.com/repos/tatsuki-m/protospace","forks_url":"https://api.github.com/repos/tatsuki-m/protospace/forks","keys_url":"https://api.github.com/repos/tatsuki-m/protospace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tatsuki-m/protospace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tatsuki-m/protospace/teams","hooks_url":"https://api.github.com/repos/tatsuki-m/protospace/hooks","issue_events_url":"https://api.github.com/repos/tatsuki-m/protospace/issues/events{/number}","events_url":"https://api.github.com/repos/tatsuki-m/protospace/events","assignees_url":"https://api.github.com/repos/tatsuki-m/protospace/assignees{/user}","branches_url":"https://api.github.com/repos/tatsuki-m/protospace/branches{/branch}","tags_url":"https://api.github.com/repos/tatsuki-m/protospace/tags","blobs_url":"https://api.github.com/repos/tatsuki-m/protospace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tatsuki-m/protospace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tatsuki-m/protospace/git/refs{/sha}","trees_url":"https://api.github.com/repos/tatsuki-m/protospace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tatsuki-m/protospace/statuses/{sha}","languages_url":"https://api.github.com/repos/tatsuki-m/protospace/languages","stargazers_url":"https://api.github.com/repos/tatsuki-m/protospace/stargazers","contributors_url":"https://api.github.com/repos/tatsuki-m/protospace/contributors","subscribers_url":"https://api.github.com/repos/tatsuki-m/protospace/subscribers","subscription_url":"https://api.github.com/repos/tatsuki-m/protospace/subscription","commits_url":"https://api.github.com/repos/tatsuki-m/protospace/commits{/sha}","git_commits_url":"https://api.github.com/repos/tatsuki-m/protospace/git/commits{/sha}","comments_url":"https://api.github.com/repos/tatsuki-m/protospace/comments{/number}","issue_comment_url":"https://api.github.com/repos/tatsuki-m/protospace/issues/comments{/number}","contents_url":"https://api.github.com/repos/tatsuki-m/protospace/contents/{+path}","compare_url":"https://api.github.com/repos/tatsuki-m/protospace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tatsuki-m/protospace/merges","archive_url":"https://api.github.com/repos/tatsuki-m/protospace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tatsuki-m/protospace/downloads","issues_url":"https://api.github.com/repos/tatsuki-m/protospace/issues{/number}","pulls_url":"https://api.github.com/repos/tatsuki-m/protospace/pulls{/number}","milestones_url":"https://api.github.com/repos/tatsuki-m/protospace/milestones{/number}","notifications_url":"https://api.github.com/repos/tatsuki-m/protospace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tatsuki-m/protospace/labels{/name}","releases_url":"https://api.github.com/repos/tatsuki-m/protospace/releases{/id}","created_at":"2015-11-29T01:28:09Z","updated_at":"2015-11-29T01:47:59Z","pushed_at":"2015-12-11T16:37:52Z","git_url":"git://github.com/tatsuki-m/protospace.git","ssh_url":"git@github.com:tatsuki-m/protospace.git","clone_url":"https://github.com/tatsuki-m/protospace.git","svn_url":"https://github.com/tatsuki-m/protospace","homepage":null,"size":594,"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/tatsuki-m/protospace/pulls/9"},"html":{"href":"https://github.com/tatsuki-m/protospace/pull/9"},"issue":{"href":"https://api.github.com/repos/tatsuki-m/protospace/issues/9"},"comments":{"href":"https://api.github.com/repos/tatsuki-m/protospace/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/tatsuki-m/protospace/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/tatsuki-m/protospace/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tatsuki-m/protospace/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/tatsuki-m/protospace/statuses/afebad986863b5b0420015638febcaacc116bd8f"}}}}