{"action":"created","comment":{"url":"https://api.github.com/repos/take77/rakutan2/pulls/comments/183209423","pull_request_review_id":114172388,"id":183209423,"diff_hunk":"@@ -0,0 +1,100 @@\n+class ContentsDecorator < Draper::CollectionDecorator\r\n+  include Rails.application.routes.url_helpers\r\n+\r\n+  def contents_type_all(group_type, sort_name, contents_type)\r\n+    if group_type == Affiliation::UNIVERSITY_NAME\r\n+\r\n+      h.link_to 'すべて', contents_grouping_affiliations_affiliations_path(university_name: sort_name), class: \"btn btn-custom #{'active' if contents_type.blank?}\"\r\n+\r\n+    elsif group_type == Affiliation::DEPARTMENT_NAME\r\n+\r\n+      h.link_to 'すべて', contents_grouping_affiliations_affiliations_path(department_name: sort_name), class: \"btn btn-custom #{'active' if contents_type.blank?}\"\r\n+\r\n+    elsif group_type == Affiliation::COURSE_NAME\r\n+\r\n+      h.link_to 'すべて', contents_grouping_affiliations_affiliations_path(course_name: sort_name), class: \"btn btn-custom #{'active' if @contents_type.blank?}\"\r\n+\r\n+    elsif group_type == Subject::NAME\r\n+\r\n+      h.link_to 'すべて', contents_grouping_subjects_subjects_path(name: sort_name), class: \"btn btn-custom #{'active' if contents_type.blank?}\"\r\n+\r\n+    elsif group_type == Subject::PROFESSOR\r\n+\r\n+      h.link_to 'すべて', contents_grouping_subjects_subjects_path(professor: sort_name), class: \"btn btn-custom #{'active' if contents_type.blank?}\"\r\n+\r\n+    end\r\n+  end\r","path":"app/decorators/contents_decorator.rb","position":26,"original_position":26,"commit_id":"c834529585ce83d3dddc55b84d424271c24720c4","original_commit_id":"c834529585ce83d3dddc55b84d424271c24720c4","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":"このファイルは、今回の仕様変更に伴い追加したものです。\r\naffiliationテーブルとsubjectsテーブルのカラムを使ってソートするときのlink_toのだし分けを行っています。\r\nこれ以下の記述も同様です。","created_at":"2018-04-21T13:09:15Z","updated_at":"2018-04-21T13:09:15Z","html_url":"https://github.com/take77/rakutan2/pull/14#discussion_r183209423","pull_request_url":"https://api.github.com/repos/take77/rakutan2/pulls/14","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/take77/rakutan2/pulls/comments/183209423"},"html":{"href":"https://github.com/take77/rakutan2/pull/14#discussion_r183209423"},"pull_request":{"href":"https://api.github.com/repos/take77/rakutan2/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/take77/rakutan2/pulls/14","id":180115704,"html_url":"https://github.com/take77/rakutan2/pull/14","diff_url":"https://github.com/take77/rakutan2/pull/14.diff","patch_url":"https://github.com/take77/rakutan2/pull/14.patch","issue_url":"https://api.github.com/repos/take77/rakutan2/issues/14","number":14,"state":"open","locked":false,"title":"revised views","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":"　ページネーションの実装に伴い、ビューを大幅に変更しました。\r\n　理由は、もともとの記述だとページネーションが目指した動作をしなかったからです。例えば、「すべて」の項目の2ページ目を見ている状態で「過去問」の項目に移ると「過去問」の項目が2ページ目から表示されてしまうといった具合です。\r\n　そこでこの度、remote: true を項目の切り替えボタンに活用することにより、「すべて」の項目をどこまで見ていても、項目を「過去問」に切り替えれば、「過去問」の一ページ目から表示できるy等にしました。\r\n　これらの変更と同時にviewもよりきれいに見えるように変更しました。\r\n　更新が遅くなってしまい恐縮ですが、なにとぞご指導いただけますようお願い申し上げます。","created_at":"2018-04-07T17:24:17Z","updated_at":"2018-04-21T13:09:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b72c1df57212c4862a480b8327689856f7dbf35","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/take77/rakutan2/pulls/14/commits","review_comments_url":"https://api.github.com/repos/take77/rakutan2/pulls/14/comments","review_comment_url":"https://api.github.com/repos/take77/rakutan2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/take77/rakutan2/issues/14/comments","statuses_url":"https://api.github.com/repos/take77/rakutan2/statuses/c834529585ce83d3dddc55b84d424271c24720c4","head":{"label":"take77:revised_views","ref":"revised_views","sha":"c834529585ce83d3dddc55b84d424271c24720c4","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":"2018-04-21T03:46:40Z","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":12158,"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,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"take77:master","ref":"master","sha":"3cb3deb5c82cc6ae6fba5ffe18aa998fceb7e88e","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":"2018-04-21T03:46:40Z","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":12158,"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,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/take77/rakutan2/pulls/14"},"html":{"href":"https://github.com/take77/rakutan2/pull/14"},"issue":{"href":"https://api.github.com/repos/take77/rakutan2/issues/14"},"comments":{"href":"https://api.github.com/repos/take77/rakutan2/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/take77/rakutan2/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/take77/rakutan2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/take77/rakutan2/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/take77/rakutan2/statuses/c834529585ce83d3dddc55b84d424271c24720c4"}},"author_association":"OWNER"}}
{"actor":{"display_login":"take77"}}