{"action":"created","comment":{"url":"https://api.github.com/repos/norahito/dive23/pulls/comments/81746397","pull_request_review_id":2702432,"id":81746397,"diff_hunk":"@@ -25,4 +25,14 @@ def show\n     end\n   end\n   \n+  def favorite\n+    @favorites = @user.favorites.order(\"created_at DESC\")\n+    @questions = @favorites.map {|favorite| favorite.question }","path":"app/controllers/users_controller.rb","position":22,"original_position":22,"commit_id":"0995cf8b6b05a9b4ad8243eea9f5d5adf01e2ad0","original_commit_id":"0995cf8b6b05a9b4ad8243eea9f5d5adf01e2ad0","user":{"login":"norahito","id":20297591,"avatar_url":"https://avatars.githubusercontent.com/u/20297591?v=3","gravatar_id":"","url":"https://api.github.com/users/norahito","html_url":"https://github.com/norahito","followers_url":"https://api.github.com/users/norahito/followers","following_url":"https://api.github.com/users/norahito/following{/other_user}","gists_url":"https://api.github.com/users/norahito/gists{/gist_id}","starred_url":"https://api.github.com/users/norahito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norahito/subscriptions","organizations_url":"https://api.github.com/users/norahito/orgs","repos_url":"https://api.github.com/users/norahito/repos","events_url":"https://api.github.com/users/norahito/events{/privacy}","received_events_url":"https://api.github.com/users/norahito/received_events","type":"User","site_admin":false},"body":"質問なのですが、ここで@favoritesをぐるぐる回してquestionsを取り直してるのって何故ですか？今までのパターンだとcontrollerでは@favoritesをviewに回してview側でfavorites.eachでぐるぐるする事が多かったので。何かにはまった結果こう変えたのかなって思って気になりました。","created_at":"2016-10-04T12:39:21Z","updated_at":"2016-10-04T12:39:24Z","html_url":"https://github.com/norahito/dive23/pull/150#discussion_r81746397","pull_request_url":"https://api.github.com/repos/norahito/dive23/pulls/150","_links":{"self":{"href":"https://api.github.com/repos/norahito/dive23/pulls/comments/81746397"},"html":{"href":"https://github.com/norahito/dive23/pull/150#discussion_r81746397"},"pull_request":{"href":"https://api.github.com/repos/norahito/dive23/pulls/150"}}},"pull_request":{"url":"https://api.github.com/repos/norahito/dive23/pulls/150","id":87833394,"html_url":"https://github.com/norahito/dive23/pull/150","diff_url":"https://github.com/norahito/dive23/pull/150.diff","patch_url":"https://github.com/norahito/dive23/pull/150.patch","issue_url":"https://api.github.com/repos/norahito/dive23/issues/150","number":150,"state":"open","locked":false,"title":"【Fixed】お気に入りページ作成","user":{"login":"choochoopiston","id":19501004,"avatar_url":"https://avatars.githubusercontent.com/u/19501004?v=3","gravatar_id":"","url":"https://api.github.com/users/choochoopiston","html_url":"https://github.com/choochoopiston","followers_url":"https://api.github.com/users/choochoopiston/followers","following_url":"https://api.github.com/users/choochoopiston/following{/other_user}","gists_url":"https://api.github.com/users/choochoopiston/gists{/gist_id}","starred_url":"https://api.github.com/users/choochoopiston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choochoopiston/subscriptions","organizations_url":"https://api.github.com/users/choochoopiston/orgs","repos_url":"https://api.github.com/users/choochoopiston/repos","events_url":"https://api.github.com/users/choochoopiston/events{/privacy}","received_events_url":"https://api.github.com/users/choochoopiston/received_events","type":"User","site_admin":false},"body":"#142\r\n\r\nお気に入りページ作成ですが、ページ作成というより、質問一覧ページに、\"お気に入り\"というタブを作って、そこに、自分がお気に入り登録した質問を表示させるようにしました。\r\n\r\n本家のサイトも、お気に入り登録すると、どこに表示される確認しましたら、お気に入りページというのはなく、どうやら質問一覧の”おすすめ”というタブに表示される感じだったこともあり、このようにしました。","created_at":"2016-10-04T04:54:31Z","updated_at":"2016-10-04T12:39:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b83d5a5870ab2802ecfb25a543b4a28834e0f9fd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/norahito/dive23/pulls/150/commits","review_comments_url":"https://api.github.com/repos/norahito/dive23/pulls/150/comments","review_comment_url":"https://api.github.com/repos/norahito/dive23/pulls/comments{/number}","comments_url":"https://api.github.com/repos/norahito/dive23/issues/150/comments","statuses_url":"https://api.github.com/repos/norahito/dive23/statuses/0995cf8b6b05a9b4ad8243eea9f5d5adf01e2ad0","head":{"label":"norahito:issues#142","ref":"issues#142","sha":"0995cf8b6b05a9b4ad8243eea9f5d5adf01e2ad0","user":{"login":"norahito","id":20297591,"avatar_url":"https://avatars.githubusercontent.com/u/20297591?v=3","gravatar_id":"","url":"https://api.github.com/users/norahito","html_url":"https://github.com/norahito","followers_url":"https://api.github.com/users/norahito/followers","following_url":"https://api.github.com/users/norahito/following{/other_user}","gists_url":"https://api.github.com/users/norahito/gists{/gist_id}","starred_url":"https://api.github.com/users/norahito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norahito/subscriptions","organizations_url":"https://api.github.com/users/norahito/orgs","repos_url":"https://api.github.com/users/norahito/repos","events_url":"https://api.github.com/users/norahito/events{/privacy}","received_events_url":"https://api.github.com/users/norahito/received_events","type":"User","site_admin":false},"repo":{"id":65704670,"name":"dive23","full_name":"norahito/dive23","owner":{"login":"norahito","id":20297591,"avatar_url":"https://avatars.githubusercontent.com/u/20297591?v=3","gravatar_id":"","url":"https://api.github.com/users/norahito","html_url":"https://github.com/norahito","followers_url":"https://api.github.com/users/norahito/followers","following_url":"https://api.github.com/users/norahito/following{/other_user}","gists_url":"https://api.github.com/users/norahito/gists{/gist_id}","starred_url":"https://api.github.com/users/norahito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norahito/subscriptions","organizations_url":"https://api.github.com/users/norahito/orgs","repos_url":"https://api.github.com/users/norahito/repos","events_url":"https://api.github.com/users/norahito/events{/privacy}","received_events_url":"https://api.github.com/users/norahito/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/norahito/dive23","description":"repository for dive23","fork":false,"url":"https://api.github.com/repos/norahito/dive23","forks_url":"https://api.github.com/repos/norahito/dive23/forks","keys_url":"https://api.github.com/repos/norahito/dive23/keys{/key_id}","collaborators_url":"https://api.github.com/repos/norahito/dive23/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/norahito/dive23/teams","hooks_url":"https://api.github.com/repos/norahito/dive23/hooks","issue_events_url":"https://api.github.com/repos/norahito/dive23/issues/events{/number}","events_url":"https://api.github.com/repos/norahito/dive23/events","assignees_url":"https://api.github.com/repos/norahito/dive23/assignees{/user}","branches_url":"https://api.github.com/repos/norahito/dive23/branches{/branch}","tags_url":"https://api.github.com/repos/norahito/dive23/tags","blobs_url":"https://api.github.com/repos/norahito/dive23/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/norahito/dive23/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/norahito/dive23/git/refs{/sha}","trees_url":"https://api.github.com/repos/norahito/dive23/git/trees{/sha}","statuses_url":"https://api.github.com/repos/norahito/dive23/statuses/{sha}","languages_url":"https://api.github.com/repos/norahito/dive23/languages","stargazers_url":"https://api.github.com/repos/norahito/dive23/stargazers","contributors_url":"https://api.github.com/repos/norahito/dive23/contributors","subscribers_url":"https://api.github.com/repos/norahito/dive23/subscribers","subscription_url":"https://api.github.com/repos/norahito/dive23/subscription","commits_url":"https://api.github.com/repos/norahito/dive23/commits{/sha}","git_commits_url":"https://api.github.com/repos/norahito/dive23/git/commits{/sha}","comments_url":"https://api.github.com/repos/norahito/dive23/comments{/number}","issue_comment_url":"https://api.github.com/repos/norahito/dive23/issues/comments{/number}","contents_url":"https://api.github.com/repos/norahito/dive23/contents/{+path}","compare_url":"https://api.github.com/repos/norahito/dive23/compare/{base}...{head}","merges_url":"https://api.github.com/repos/norahito/dive23/merges","archive_url":"https://api.github.com/repos/norahito/dive23/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/norahito/dive23/downloads","issues_url":"https://api.github.com/repos/norahito/dive23/issues{/number}","pulls_url":"https://api.github.com/repos/norahito/dive23/pulls{/number}","milestones_url":"https://api.github.com/repos/norahito/dive23/milestones{/number}","notifications_url":"https://api.github.com/repos/norahito/dive23/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/norahito/dive23/labels{/name}","releases_url":"https://api.github.com/repos/norahito/dive23/releases{/id}","deployments_url":"https://api.github.com/repos/norahito/dive23/deployments","created_at":"2016-08-15T04:32:55Z","updated_at":"2016-08-15T12:15:08Z","pushed_at":"2016-10-04T11:49:07Z","git_url":"git://github.com/norahito/dive23.git","ssh_url":"git@github.com:norahito/dive23.git","clone_url":"https://github.com/norahito/dive23.git","svn_url":"https://github.com/norahito/dive23","homepage":null,"size":211,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":1,"default_branch":"master"}},"base":{"label":"norahito:master","ref":"master","sha":"0c5ff0be89fddbfd7eeb3f2c16d570b0a092ba91","user":{"login":"norahito","id":20297591,"avatar_url":"https://avatars.githubusercontent.com/u/20297591?v=3","gravatar_id":"","url":"https://api.github.com/users/norahito","html_url":"https://github.com/norahito","followers_url":"https://api.github.com/users/norahito/followers","following_url":"https://api.github.com/users/norahito/following{/other_user}","gists_url":"https://api.github.com/users/norahito/gists{/gist_id}","starred_url":"https://api.github.com/users/norahito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norahito/subscriptions","organizations_url":"https://api.github.com/users/norahito/orgs","repos_url":"https://api.github.com/users/norahito/repos","events_url":"https://api.github.com/users/norahito/events{/privacy}","received_events_url":"https://api.github.com/users/norahito/received_events","type":"User","site_admin":false},"repo":{"id":65704670,"name":"dive23","full_name":"norahito/dive23","owner":{"login":"norahito","id":20297591,"avatar_url":"https://avatars.githubusercontent.com/u/20297591?v=3","gravatar_id":"","url":"https://api.github.com/users/norahito","html_url":"https://github.com/norahito","followers_url":"https://api.github.com/users/norahito/followers","following_url":"https://api.github.com/users/norahito/following{/other_user}","gists_url":"https://api.github.com/users/norahito/gists{/gist_id}","starred_url":"https://api.github.com/users/norahito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/norahito/subscriptions","organizations_url":"https://api.github.com/users/norahito/orgs","repos_url":"https://api.github.com/users/norahito/repos","events_url":"https://api.github.com/users/norahito/events{/privacy}","received_events_url":"https://api.github.com/users/norahito/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/norahito/dive23","description":"repository for dive23","fork":false,"url":"https://api.github.com/repos/norahito/dive23","forks_url":"https://api.github.com/repos/norahito/dive23/forks","keys_url":"https://api.github.com/repos/norahito/dive23/keys{/key_id}","collaborators_url":"https://api.github.com/repos/norahito/dive23/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/norahito/dive23/teams","hooks_url":"https://api.github.com/repos/norahito/dive23/hooks","issue_events_url":"https://api.github.com/repos/norahito/dive23/issues/events{/number}","events_url":"https://api.github.com/repos/norahito/dive23/events","assignees_url":"https://api.github.com/repos/norahito/dive23/assignees{/user}","branches_url":"https://api.github.com/repos/norahito/dive23/branches{/branch}","tags_url":"https://api.github.com/repos/norahito/dive23/tags","blobs_url":"https://api.github.com/repos/norahito/dive23/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/norahito/dive23/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/norahito/dive23/git/refs{/sha}","trees_url":"https://api.github.com/repos/norahito/dive23/git/trees{/sha}","statuses_url":"https://api.github.com/repos/norahito/dive23/statuses/{sha}","languages_url":"https://api.github.com/repos/norahito/dive23/languages","stargazers_url":"https://api.github.com/repos/norahito/dive23/stargazers","contributors_url":"https://api.github.com/repos/norahito/dive23/contributors","subscribers_url":"https://api.github.com/repos/norahito/dive23/subscribers","subscription_url":"https://api.github.com/repos/norahito/dive23/subscription","commits_url":"https://api.github.com/repos/norahito/dive23/commits{/sha}","git_commits_url":"https://api.github.com/repos/norahito/dive23/git/commits{/sha}","comments_url":"https://api.github.com/repos/norahito/dive23/comments{/number}","issue_comment_url":"https://api.github.com/repos/norahito/dive23/issues/comments{/number}","contents_url":"https://api.github.com/repos/norahito/dive23/contents/{+path}","compare_url":"https://api.github.com/repos/norahito/dive23/compare/{base}...{head}","merges_url":"https://api.github.com/repos/norahito/dive23/merges","archive_url":"https://api.github.com/repos/norahito/dive23/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/norahito/dive23/downloads","issues_url":"https://api.github.com/repos/norahito/dive23/issues{/number}","pulls_url":"https://api.github.com/repos/norahito/dive23/pulls{/number}","milestones_url":"https://api.github.com/repos/norahito/dive23/milestones{/number}","notifications_url":"https://api.github.com/repos/norahito/dive23/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/norahito/dive23/labels{/name}","releases_url":"https://api.github.com/repos/norahito/dive23/releases{/id}","deployments_url":"https://api.github.com/repos/norahito/dive23/deployments","created_at":"2016-08-15T04:32:55Z","updated_at":"2016-08-15T12:15:08Z","pushed_at":"2016-10-04T11:49:07Z","git_url":"git://github.com/norahito/dive23.git","ssh_url":"git@github.com:norahito/dive23.git","clone_url":"https://github.com/norahito/dive23.git","svn_url":"https://github.com/norahito/dive23","homepage":null,"size":211,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":14,"forks":0,"open_issues":14,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/norahito/dive23/pulls/150"},"html":{"href":"https://github.com/norahito/dive23/pull/150"},"issue":{"href":"https://api.github.com/repos/norahito/dive23/issues/150"},"comments":{"href":"https://api.github.com/repos/norahito/dive23/issues/150/comments"},"review_comments":{"href":"https://api.github.com/repos/norahito/dive23/pulls/150/comments"},"review_comment":{"href":"https://api.github.com/repos/norahito/dive23/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/norahito/dive23/pulls/150/commits"},"statuses":{"href":"https://api.github.com/repos/norahito/dive23/statuses/0995cf8b6b05a9b4ad8243eea9f5d5adf01e2ad0"}}}}
{"actor":{"display_login":"norahito"}}