{"action":"created","comment":{"url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/comments/56925528","id":56925528,"diff_hunk":"@@ -30,4 +30,17 @@ def to_article_params\n   def plain_text_body\n     @plain_text_body ||= extract_plain_text(body)\n   end\n+\n+  def display_credits?(pages, all: false)\n+    return false unless credits.present?\n+    if all\n+      true\n+    else\n+      if pages.respond_to?(:current_page)\n+        pages.current_page == 1","path":"app/decorators/post_decorator.rb","position":11,"original_position":11,"commit_id":"65544b5b62639c9f67a25e2259b5eaf26c70dac5","original_commit_id":"65544b5b62639c9f67a25e2259b5eaf26c70dac5","user":{"login":"tricknotes","id":290782,"avatar_url":"https://avatars.githubusercontent.com/u/290782?v=3","gravatar_id":"","url":"https://api.github.com/users/tricknotes","html_url":"https://github.com/tricknotes","followers_url":"https://api.github.com/users/tricknotes/followers","following_url":"https://api.github.com/users/tricknotes/following{/other_user}","gists_url":"https://api.github.com/users/tricknotes/gists{/gist_id}","starred_url":"https://api.github.com/users/tricknotes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tricknotes/subscriptions","organizations_url":"https://api.github.com/users/tricknotes/orgs","repos_url":"https://api.github.com/users/tricknotes/repos","events_url":"https://api.github.com/users/tricknotes/events{/privacy}","received_events_url":"https://api.github.com/users/tricknotes/received_events","type":"User","site_admin":false},"body":"`pages` に依存するよりも、`pages.current_page` を引数として受け取る方がオブジェクトの依存度が低くてよさそうですね。\r\n","created_at":"2016-03-22T01:30:58Z","updated_at":"2016-03-22T01:30:58Z","html_url":"https://github.com/bm-sms/daimon-news-multi-tenant/pull/374#discussion_r56925528","pull_request_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/374","_links":{"self":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/comments/56925528"},"html":{"href":"https://github.com/bm-sms/daimon-news-multi-tenant/pull/374#discussion_r56925528"},"pull_request":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/374"}}},"pull_request":{"url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/374","id":63182787,"html_url":"https://github.com/bm-sms/daimon-news-multi-tenant/pull/374","diff_url":"https://github.com/bm-sms/daimon-news-multi-tenant/pull/374.diff","patch_url":"https://github.com/bm-sms/daimon-news-multi-tenant/pull/374.patch","issue_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/374","number":374,"state":"open","locked":false,"title":"Fix an error when /public_id?all=true","user":{"login":"okkez","id":33111,"avatar_url":"https://avatars.githubusercontent.com/u/33111?v=3","gravatar_id":"","url":"https://api.github.com/users/okkez","html_url":"https://github.com/okkez","followers_url":"https://api.github.com/users/okkez/followers","following_url":"https://api.github.com/users/okkez/following{/other_user}","gists_url":"https://api.github.com/users/okkez/gists{/gist_id}","starred_url":"https://api.github.com/users/okkez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okkez/subscriptions","organizations_url":"https://api.github.com/users/okkez/orgs","repos_url":"https://api.github.com/users/okkez/repos","events_url":"https://api.github.com/users/okkez/events{/privacy}","received_events_url":"https://api.github.com/users/okkez/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-03-17T07:27:29Z","updated_at":"2016-03-22T01:30:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0ffc0f56b8d230530c41ef1a87473b0351d05226","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/374/commits","review_comments_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/374/comments","review_comment_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/374/comments","statuses_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/statuses/65544b5b62639c9f67a25e2259b5eaf26c70dac5","head":{"label":"bm-sms:fix-error-when-all-true","ref":"fix-error-when-all-true","sha":"65544b5b62639c9f67a25e2259b5eaf26c70dac5","user":{"login":"bm-sms","id":11305323,"avatar_url":"https://avatars.githubusercontent.com/u/11305323?v=3","gravatar_id":"","url":"https://api.github.com/users/bm-sms","html_url":"https://github.com/bm-sms","followers_url":"https://api.github.com/users/bm-sms/followers","following_url":"https://api.github.com/users/bm-sms/following{/other_user}","gists_url":"https://api.github.com/users/bm-sms/gists{/gist_id}","starred_url":"https://api.github.com/users/bm-sms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bm-sms/subscriptions","organizations_url":"https://api.github.com/users/bm-sms/orgs","repos_url":"https://api.github.com/users/bm-sms/repos","events_url":"https://api.github.com/users/bm-sms/events{/privacy}","received_events_url":"https://api.github.com/users/bm-sms/received_events","type":"Organization","site_admin":false},"repo":{"id":46255953,"name":"daimon-news-multi-tenant","full_name":"bm-sms/daimon-news-multi-tenant","owner":{"login":"bm-sms","id":11305323,"avatar_url":"https://avatars.githubusercontent.com/u/11305323?v=3","gravatar_id":"","url":"https://api.github.com/users/bm-sms","html_url":"https://github.com/bm-sms","followers_url":"https://api.github.com/users/bm-sms/followers","following_url":"https://api.github.com/users/bm-sms/following{/other_user}","gists_url":"https://api.github.com/users/bm-sms/gists{/gist_id}","starred_url":"https://api.github.com/users/bm-sms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bm-sms/subscriptions","organizations_url":"https://api.github.com/users/bm-sms/orgs","repos_url":"https://api.github.com/users/bm-sms/repos","events_url":"https://api.github.com/users/bm-sms/events{/privacy}","received_events_url":"https://api.github.com/users/bm-sms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bm-sms/daimon-news-multi-tenant","description":"","fork":false,"url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant","forks_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/forks","keys_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/teams","hooks_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/hooks","issue_events_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/events{/number}","events_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/events","assignees_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/assignees{/user}","branches_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/branches{/branch}","tags_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/tags","blobs_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/refs{/sha}","trees_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/statuses/{sha}","languages_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/languages","stargazers_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/stargazers","contributors_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/contributors","subscribers_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/subscribers","subscription_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/subscription","commits_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/commits{/sha}","git_commits_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/commits{/sha}","comments_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/comments{/number}","issue_comment_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/comments{/number}","contents_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/contents/{+path}","compare_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/merges","archive_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/downloads","issues_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues{/number}","pulls_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls{/number}","milestones_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/milestones{/number}","notifications_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/labels{/name}","releases_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/releases{/id}","deployments_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/deployments","created_at":"2015-11-16T06:20:35Z","updated_at":"2016-03-11T14:01:41Z","pushed_at":"2016-03-22T01:16:30Z","git_url":"git://github.com/bm-sms/daimon-news-multi-tenant.git","ssh_url":"git@github.com:bm-sms/daimon-news-multi-tenant.git","clone_url":"https://github.com/bm-sms/daimon-news-multi-tenant.git","svn_url":"https://github.com/bm-sms/daimon-news-multi-tenant","homepage":"","size":920,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":25,"forks":2,"open_issues":25,"watchers":5,"default_branch":"master"}},"base":{"label":"bm-sms:master","ref":"master","sha":"8cdf957c26f26fa254dd91aaa456702e71e2060d","user":{"login":"bm-sms","id":11305323,"avatar_url":"https://avatars.githubusercontent.com/u/11305323?v=3","gravatar_id":"","url":"https://api.github.com/users/bm-sms","html_url":"https://github.com/bm-sms","followers_url":"https://api.github.com/users/bm-sms/followers","following_url":"https://api.github.com/users/bm-sms/following{/other_user}","gists_url":"https://api.github.com/users/bm-sms/gists{/gist_id}","starred_url":"https://api.github.com/users/bm-sms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bm-sms/subscriptions","organizations_url":"https://api.github.com/users/bm-sms/orgs","repos_url":"https://api.github.com/users/bm-sms/repos","events_url":"https://api.github.com/users/bm-sms/events{/privacy}","received_events_url":"https://api.github.com/users/bm-sms/received_events","type":"Organization","site_admin":false},"repo":{"id":46255953,"name":"daimon-news-multi-tenant","full_name":"bm-sms/daimon-news-multi-tenant","owner":{"login":"bm-sms","id":11305323,"avatar_url":"https://avatars.githubusercontent.com/u/11305323?v=3","gravatar_id":"","url":"https://api.github.com/users/bm-sms","html_url":"https://github.com/bm-sms","followers_url":"https://api.github.com/users/bm-sms/followers","following_url":"https://api.github.com/users/bm-sms/following{/other_user}","gists_url":"https://api.github.com/users/bm-sms/gists{/gist_id}","starred_url":"https://api.github.com/users/bm-sms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bm-sms/subscriptions","organizations_url":"https://api.github.com/users/bm-sms/orgs","repos_url":"https://api.github.com/users/bm-sms/repos","events_url":"https://api.github.com/users/bm-sms/events{/privacy}","received_events_url":"https://api.github.com/users/bm-sms/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bm-sms/daimon-news-multi-tenant","description":"","fork":false,"url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant","forks_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/forks","keys_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/teams","hooks_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/hooks","issue_events_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/events{/number}","events_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/events","assignees_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/assignees{/user}","branches_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/branches{/branch}","tags_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/tags","blobs_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/refs{/sha}","trees_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/statuses/{sha}","languages_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/languages","stargazers_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/stargazers","contributors_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/contributors","subscribers_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/subscribers","subscription_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/subscription","commits_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/commits{/sha}","git_commits_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/git/commits{/sha}","comments_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/comments{/number}","issue_comment_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/comments{/number}","contents_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/contents/{+path}","compare_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/merges","archive_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/downloads","issues_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues{/number}","pulls_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls{/number}","milestones_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/milestones{/number}","notifications_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/labels{/name}","releases_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/releases{/id}","deployments_url":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/deployments","created_at":"2015-11-16T06:20:35Z","updated_at":"2016-03-11T14:01:41Z","pushed_at":"2016-03-22T01:16:30Z","git_url":"git://github.com/bm-sms/daimon-news-multi-tenant.git","ssh_url":"git@github.com:bm-sms/daimon-news-multi-tenant.git","clone_url":"https://github.com/bm-sms/daimon-news-multi-tenant.git","svn_url":"https://github.com/bm-sms/daimon-news-multi-tenant","homepage":"","size":920,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":25,"forks":2,"open_issues":25,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/374"},"html":{"href":"https://github.com/bm-sms/daimon-news-multi-tenant/pull/374"},"issue":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/374"},"comments":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/issues/374/comments"},"review_comments":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/374/comments"},"review_comment":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/pulls/374/commits"},"statuses":{"href":"https://api.github.com/repos/bm-sms/daimon-news-multi-tenant/statuses/65544b5b62639c9f67a25e2259b5eaf26c70dac5"}}}}