{"action":"created","comment":{"url":"https://api.github.com/repos/take77/rakutan2/pulls/comments/147572259","pull_request_review_id":72689013,"id":147572259,"diff_hunk":"@@ -5,7 +5,12 @@ class Content < ActiveRecord::Base\n   has_many :content_files\n   has_many :comments\n   has_many :clips\n+  has_many :users, through: :clips\n \n   accepts_nested_attributes_for :content_files, allow_destroy: true\n   enum status:{exam: 0, report: 1, note: 2}\n+\n+  scope :pick_exams, -> (contents) {contents.where(status: 'exam')}","path":"app/models/content.rb","position":9,"original_position":9,"commit_id":"d5f5069716a4b5aa00db24e78573b4ae819aaf6a","original_commit_id":"95c73b785faae3b5e60268977849b27b307a2aa8","user":{"login":"r-ume","id":22656143,"avatar_url":"https://avatars3.githubusercontent.com/u/22656143?v=4","gravatar_id":"","url":"https://api.github.com/users/r-ume","html_url":"https://github.com/r-ume","followers_url":"https://api.github.com/users/r-ume/followers","following_url":"https://api.github.com/users/r-ume/following{/other_user}","gists_url":"https://api.github.com/users/r-ume/gists{/gist_id}","starred_url":"https://api.github.com/users/r-ume/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/r-ume/subscriptions","organizations_url":"https://api.github.com/users/r-ume/orgs","repos_url":"https://api.github.com/users/r-ume/repos","events_url":"https://api.github.com/users/r-ume/events{/privacy}","received_events_url":"https://api.github.com/users/r-ume/received_events","type":"User","site_admin":false},"body":"すまん、そういうことね。了解。\r\n\r\n> 『userがお気に入りに登録しているcontents全て』からstatusがexamのものを全て抽出する\r\n\r\nという意味なら、まずscopeの名前を変えたほうがいいね。pick_examsだと英語的にexamsだけを選択するという意味になるので。","created_at":"2017-10-29T07:01:27Z","updated_at":"2017-10-29T07:01:54Z","html_url":"https://github.com/take77/rakutan2/pull/2#discussion_r147572259","pull_request_url":"https://api.github.com/repos/take77/rakutan2/pulls/2","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/take77/rakutan2/pulls/comments/147572259"},"html":{"href":"https://github.com/take77/rakutan2/pull/2#discussion_r147572259"},"pull_request":{"href":"https://api.github.com/repos/take77/rakutan2/pulls/2"}},"in_reply_to_id":147547955},"pull_request":{"url":"https://api.github.com/repos/take77/rakutan2/pulls/2","id":148879964,"html_url":"https://github.com/take77/rakutan2/pull/2","diff_url":"https://github.com/take77/rakutan2/pull/2.diff","patch_url":"https://github.com/take77/rakutan2/pull/2.patch","issue_url":"https://api.github.com/repos/take77/rakutan2/issues/2","number":2,"state":"open","locked":false,"title":"[WIP] Create clip function","user":{"login":"take77","id":31177432,"avatar_url":"https://avatars3.githubusercontent.com/u/31177432?v=4","gravatar_id":"","url":"https://api.github.com/users/take77","html_url":"https://github.com/take77","followers_url":"https://api.github.com/users/take77/followers","following_url":"https://api.github.com/users/take77/following{/other_user}","gists_url":"https://api.github.com/users/take77/gists{/gist_id}","starred_url":"https://api.github.com/users/take77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/take77/subscriptions","organizations_url":"https://api.github.com/users/take77/orgs","repos_url":"https://api.github.com/users/take77/repos","events_url":"https://api.github.com/users/take77/events{/privacy}","received_events_url":"https://api.github.com/users/take77/received_events","type":"User","site_admin":false},"body":"各contentのお気に入り機能を実装しました。\r\nただ、contentがclipされていない時にnilが入ってしまうため、decorateできないという問題に直面しております。\r\n\r\n記述した内容は以下の通りです。\r\n・contentがclipされているか否かの判定\r\n・contentがclipされていない時は「お気に入りに追加」をcontentがclipされている時は「お気に入りから削除」を表示\r\n　↑問題の部分\r\n・「お気に入りに追加」を押すとcontentがclipされる\r\n・「お気に入りから削除」を押すとcontentがclipからdeleteされる\r\n・clipに登録したcontentの一覧表示\r\n\r\nお忙しいところ恐縮ですが、何卒ご指導ご鞭撻を賜りますよう、お願い申し上げます。","created_at":"2017-10-26T09:22:51Z","updated_at":"2017-10-29T07:01:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0965429bbb0af21e8a3ac01e22bddbfa877e76b2","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/take77/rakutan2/pulls/2/commits","review_comments_url":"https://api.github.com/repos/take77/rakutan2/pulls/2/comments","review_comment_url":"https://api.github.com/repos/take77/rakutan2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/take77/rakutan2/issues/2/comments","statuses_url":"https://api.github.com/repos/take77/rakutan2/statuses/d5f5069716a4b5aa00db24e78573b4ae819aaf6a","head":{"label":"take77:create_clip_function","ref":"create_clip_function","sha":"d5f5069716a4b5aa00db24e78573b4ae819aaf6a","user":{"login":"take77","id":31177432,"avatar_url":"https://avatars3.githubusercontent.com/u/31177432?v=4","gravatar_id":"","url":"https://api.github.com/users/take77","html_url":"https://github.com/take77","followers_url":"https://api.github.com/users/take77/followers","following_url":"https://api.github.com/users/take77/following{/other_user}","gists_url":"https://api.github.com/users/take77/gists{/gist_id}","starred_url":"https://api.github.com/users/take77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/take77/subscriptions","organizations_url":"https://api.github.com/users/take77/orgs","repos_url":"https://api.github.com/users/take77/repos","events_url":"https://api.github.com/users/take77/events{/privacy}","received_events_url":"https://api.github.com/users/take77/received_events","type":"User","site_admin":false},"repo":{"id":107254220,"name":"rakutan2","full_name":"take77/rakutan2","owner":{"login":"take77","id":31177432,"avatar_url":"https://avatars3.githubusercontent.com/u/31177432?v=4","gravatar_id":"","url":"https://api.github.com/users/take77","html_url":"https://github.com/take77","followers_url":"https://api.github.com/users/take77/followers","following_url":"https://api.github.com/users/take77/following{/other_user}","gists_url":"https://api.github.com/users/take77/gists{/gist_id}","starred_url":"https://api.github.com/users/take77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/take77/subscriptions","organizations_url":"https://api.github.com/users/take77/orgs","repos_url":"https://api.github.com/users/take77/repos","events_url":"https://api.github.com/users/take77/events{/privacy}","received_events_url":"https://api.github.com/users/take77/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/take77/rakutan2","description":null,"fork":false,"url":"https://api.github.com/repos/take77/rakutan2","forks_url":"https://api.github.com/repos/take77/rakutan2/forks","keys_url":"https://api.github.com/repos/take77/rakutan2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/take77/rakutan2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/take77/rakutan2/teams","hooks_url":"https://api.github.com/repos/take77/rakutan2/hooks","issue_events_url":"https://api.github.com/repos/take77/rakutan2/issues/events{/number}","events_url":"https://api.github.com/repos/take77/rakutan2/events","assignees_url":"https://api.github.com/repos/take77/rakutan2/assignees{/user}","branches_url":"https://api.github.com/repos/take77/rakutan2/branches{/branch}","tags_url":"https://api.github.com/repos/take77/rakutan2/tags","blobs_url":"https://api.github.com/repos/take77/rakutan2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/take77/rakutan2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/take77/rakutan2/git/refs{/sha}","trees_url":"https://api.github.com/repos/take77/rakutan2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/take77/rakutan2/statuses/{sha}","languages_url":"https://api.github.com/repos/take77/rakutan2/languages","stargazers_url":"https://api.github.com/repos/take77/rakutan2/stargazers","contributors_url":"https://api.github.com/repos/take77/rakutan2/contributors","subscribers_url":"https://api.github.com/repos/take77/rakutan2/subscribers","subscription_url":"https://api.github.com/repos/take77/rakutan2/subscription","commits_url":"https://api.github.com/repos/take77/rakutan2/commits{/sha}","git_commits_url":"https://api.github.com/repos/take77/rakutan2/git/commits{/sha}","comments_url":"https://api.github.com/repos/take77/rakutan2/comments{/number}","issue_comment_url":"https://api.github.com/repos/take77/rakutan2/issues/comments{/number}","contents_url":"https://api.github.com/repos/take77/rakutan2/contents/{+path}","compare_url":"https://api.github.com/repos/take77/rakutan2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/take77/rakutan2/merges","archive_url":"https://api.github.com/repos/take77/rakutan2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/take77/rakutan2/downloads","issues_url":"https://api.github.com/repos/take77/rakutan2/issues{/number}","pulls_url":"https://api.github.com/repos/take77/rakutan2/pulls{/number}","milestones_url":"https://api.github.com/repos/take77/rakutan2/milestones{/number}","notifications_url":"https://api.github.com/repos/take77/rakutan2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/take77/rakutan2/labels{/name}","releases_url":"https://api.github.com/repos/take77/rakutan2/releases{/id}","deployments_url":"https://api.github.com/repos/take77/rakutan2/deployments","created_at":"2017-10-17T10:36:43Z","updated_at":"2017-10-17T10:37:37Z","pushed_at":"2017-10-29T06:19:35Z","git_url":"git://github.com/take77/rakutan2.git","ssh_url":"git@github.com:take77/rakutan2.git","clone_url":"https://github.com/take77/rakutan2.git","svn_url":"https://github.com/take77/rakutan2","homepage":null,"size":12065,"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,"archived":false,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"take77:master","ref":"master","sha":"a175746b21072eb9c1bd5018c5d34f327a8f16d9","user":{"login":"take77","id":31177432,"avatar_url":"https://avatars3.githubusercontent.com/u/31177432?v=4","gravatar_id":"","url":"https://api.github.com/users/take77","html_url":"https://github.com/take77","followers_url":"https://api.github.com/users/take77/followers","following_url":"https://api.github.com/users/take77/following{/other_user}","gists_url":"https://api.github.com/users/take77/gists{/gist_id}","starred_url":"https://api.github.com/users/take77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/take77/subscriptions","organizations_url":"https://api.github.com/users/take77/orgs","repos_url":"https://api.github.com/users/take77/repos","events_url":"https://api.github.com/users/take77/events{/privacy}","received_events_url":"https://api.github.com/users/take77/received_events","type":"User","site_admin":false},"repo":{"id":107254220,"name":"rakutan2","full_name":"take77/rakutan2","owner":{"login":"take77","id":31177432,"avatar_url":"https://avatars3.githubusercontent.com/u/31177432?v=4","gravatar_id":"","url":"https://api.github.com/users/take77","html_url":"https://github.com/take77","followers_url":"https://api.github.com/users/take77/followers","following_url":"https://api.github.com/users/take77/following{/other_user}","gists_url":"https://api.github.com/users/take77/gists{/gist_id}","starred_url":"https://api.github.com/users/take77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/take77/subscriptions","organizations_url":"https://api.github.com/users/take77/orgs","repos_url":"https://api.github.com/users/take77/repos","events_url":"https://api.github.com/users/take77/events{/privacy}","received_events_url":"https://api.github.com/users/take77/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/take77/rakutan2","description":null,"fork":false,"url":"https://api.github.com/repos/take77/rakutan2","forks_url":"https://api.github.com/repos/take77/rakutan2/forks","keys_url":"https://api.github.com/repos/take77/rakutan2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/take77/rakutan2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/take77/rakutan2/teams","hooks_url":"https://api.github.com/repos/take77/rakutan2/hooks","issue_events_url":"https://api.github.com/repos/take77/rakutan2/issues/events{/number}","events_url":"https://api.github.com/repos/take77/rakutan2/events","assignees_url":"https://api.github.com/repos/take77/rakutan2/assignees{/user}","branches_url":"https://api.github.com/repos/take77/rakutan2/branches{/branch}","tags_url":"https://api.github.com/repos/take77/rakutan2/tags","blobs_url":"https://api.github.com/repos/take77/rakutan2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/take77/rakutan2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/take77/rakutan2/git/refs{/sha}","trees_url":"https://api.github.com/repos/take77/rakutan2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/take77/rakutan2/statuses/{sha}","languages_url":"https://api.github.com/repos/take77/rakutan2/languages","stargazers_url":"https://api.github.com/repos/take77/rakutan2/stargazers","contributors_url":"https://api.github.com/repos/take77/rakutan2/contributors","subscribers_url":"https://api.github.com/repos/take77/rakutan2/subscribers","subscription_url":"https://api.github.com/repos/take77/rakutan2/subscription","commits_url":"https://api.github.com/repos/take77/rakutan2/commits{/sha}","git_commits_url":"https://api.github.com/repos/take77/rakutan2/git/commits{/sha}","comments_url":"https://api.github.com/repos/take77/rakutan2/comments{/number}","issue_comment_url":"https://api.github.com/repos/take77/rakutan2/issues/comments{/number}","contents_url":"https://api.github.com/repos/take77/rakutan2/contents/{+path}","compare_url":"https://api.github.com/repos/take77/rakutan2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/take77/rakutan2/merges","archive_url":"https://api.github.com/repos/take77/rakutan2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/take77/rakutan2/downloads","issues_url":"https://api.github.com/repos/take77/rakutan2/issues{/number}","pulls_url":"https://api.github.com/repos/take77/rakutan2/pulls{/number}","milestones_url":"https://api.github.com/repos/take77/rakutan2/milestones{/number}","notifications_url":"https://api.github.com/repos/take77/rakutan2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/take77/rakutan2/labels{/name}","releases_url":"https://api.github.com/repos/take77/rakutan2/releases{/id}","deployments_url":"https://api.github.com/repos/take77/rakutan2/deployments","created_at":"2017-10-17T10:36:43Z","updated_at":"2017-10-17T10:37:37Z","pushed_at":"2017-10-29T06:19:35Z","git_url":"git://github.com/take77/rakutan2.git","ssh_url":"git@github.com:take77/rakutan2.git","clone_url":"https://github.com/take77/rakutan2.git","svn_url":"https://github.com/take77/rakutan2","homepage":null,"size":12065,"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,"archived":false,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/take77/rakutan2/pulls/2"},"html":{"href":"https://github.com/take77/rakutan2/pull/2"},"issue":{"href":"https://api.github.com/repos/take77/rakutan2/issues/2"},"comments":{"href":"https://api.github.com/repos/take77/rakutan2/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/take77/rakutan2/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/take77/rakutan2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/take77/rakutan2/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/take77/rakutan2/statuses/d5f5069716a4b5aa00db24e78573b4ae819aaf6a"}},"author_association":"OWNER"}}
{"actor":{"display_login":"r-ume"}}