{"action":"created","comment":{"url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/comments/35309001","id":35309001,"diff_hunk":"@@ -1,19 +1,13 @@\n class WikiPolicy < ApplicationPolicy\n \n-  class Scope < Scope\n-    def resolve\n-      if user.present? && user.admin?\n-        scope.all\n-      else\n-        scope.where(private: false)\n-      end\n-    end\n-  end\n-\n   def index\n     true\n   end\n \n+  def show\n+    record.private == false || user.present?","path":"app/policies/wiki_policy.rb","position":18,"original_position":18,"commit_id":"56db4e12c212fc3ddf5989b769ebc77a59b74798","original_commit_id":"56db4e12c212fc3ddf5989b769ebc77a59b74798","user":{"login":"eliotsykes","id":31698,"avatar_url":"https://avatars.githubusercontent.com/u/31698?v=3","gravatar_id":"","url":"https://api.github.com/users/eliotsykes","html_url":"https://github.com/eliotsykes","followers_url":"https://api.github.com/users/eliotsykes/followers","following_url":"https://api.github.com/users/eliotsykes/following{/other_user}","gists_url":"https://api.github.com/users/eliotsykes/gists{/gist_id}","starred_url":"https://api.github.com/users/eliotsykes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eliotsykes/subscriptions","organizations_url":"https://api.github.com/users/eliotsykes/orgs","repos_url":"https://api.github.com/users/eliotsykes/repos","events_url":"https://api.github.com/users/eliotsykes/events{/privacy}","received_events_url":"https://api.github.com/users/eliotsykes/received_events","type":"User","site_admin":false},"body":"Favor using booleans directly over comparing them with `==` operators, e.g.\r\n\r\n```ruby\r\n!record.private\r\n```\r\nis more conventional than:\r\n```ruby\r\nrecord.private == false\r\n```","created_at":"2015-07-23T10:36:28Z","updated_at":"2015-07-23T10:36:28Z","html_url":"https://github.com/AbdullahAlger/blocipedia/pull/19#discussion_r35309001","pull_request_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/comments/35309001"},"html":{"href":"https://github.com/AbdullahAlger/blocipedia/pull/19#discussion_r35309001"},"pull_request":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/19","id":40657081,"html_url":"https://github.com/AbdullahAlger/blocipedia/pull/19","diff_url":"https://github.com/AbdullahAlger/blocipedia/pull/19.diff","patch_url":"https://github.com/AbdullahAlger/blocipedia/pull/19.patch","issue_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/19","number":19,"state":"closed","locked":false,"title":"added patch to route and working","user":{"login":"AbdullahAlger","id":6264696,"avatar_url":"https://avatars.githubusercontent.com/u/6264696?v=3","gravatar_id":"","url":"https://api.github.com/users/AbdullahAlger","html_url":"https://github.com/AbdullahAlger","followers_url":"https://api.github.com/users/AbdullahAlger/followers","following_url":"https://api.github.com/users/AbdullahAlger/following{/other_user}","gists_url":"https://api.github.com/users/AbdullahAlger/gists{/gist_id}","starred_url":"https://api.github.com/users/AbdullahAlger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbdullahAlger/subscriptions","organizations_url":"https://api.github.com/users/AbdullahAlger/orgs","repos_url":"https://api.github.com/users/AbdullahAlger/repos","events_url":"https://api.github.com/users/AbdullahAlger/events{/privacy}","received_events_url":"https://api.github.com/users/AbdullahAlger/received_events","type":"User","site_admin":false},"body":"I changed the routing and made some changes as requested. I will move on to the markdown and the tests now.","created_at":"2015-07-23T10:23:27Z","updated_at":"2015-07-23T10:36:28Z","closed_at":"2015-07-23T10:24:04Z","merged_at":"2015-07-23T10:24:04Z","merge_commit_sha":"ceeb3d88c8b485a14e7ed793237e497ec5640686","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/19/commits","review_comments_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/19/comments","review_comment_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/19/comments","statuses_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/statuses/56db4e12c212fc3ddf5989b769ebc77a59b74798","head":{"label":"AbdullahAlger:private-wikis","ref":"private-wikis","sha":"56db4e12c212fc3ddf5989b769ebc77a59b74798","user":{"login":"AbdullahAlger","id":6264696,"avatar_url":"https://avatars.githubusercontent.com/u/6264696?v=3","gravatar_id":"","url":"https://api.github.com/users/AbdullahAlger","html_url":"https://github.com/AbdullahAlger","followers_url":"https://api.github.com/users/AbdullahAlger/followers","following_url":"https://api.github.com/users/AbdullahAlger/following{/other_user}","gists_url":"https://api.github.com/users/AbdullahAlger/gists{/gist_id}","starred_url":"https://api.github.com/users/AbdullahAlger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbdullahAlger/subscriptions","organizations_url":"https://api.github.com/users/AbdullahAlger/orgs","repos_url":"https://api.github.com/users/AbdullahAlger/repos","events_url":"https://api.github.com/users/AbdullahAlger/events{/privacy}","received_events_url":"https://api.github.com/users/AbdullahAlger/received_events","type":"User","site_admin":false},"repo":{"id":38232952,"name":"blocipedia","full_name":"AbdullahAlger/blocipedia","owner":{"login":"AbdullahAlger","id":6264696,"avatar_url":"https://avatars.githubusercontent.com/u/6264696?v=3","gravatar_id":"","url":"https://api.github.com/users/AbdullahAlger","html_url":"https://github.com/AbdullahAlger","followers_url":"https://api.github.com/users/AbdullahAlger/followers","following_url":"https://api.github.com/users/AbdullahAlger/following{/other_user}","gists_url":"https://api.github.com/users/AbdullahAlger/gists{/gist_id}","starred_url":"https://api.github.com/users/AbdullahAlger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbdullahAlger/subscriptions","organizations_url":"https://api.github.com/users/AbdullahAlger/orgs","repos_url":"https://api.github.com/users/AbdullahAlger/repos","events_url":"https://api.github.com/users/AbdullahAlger/events{/privacy}","received_events_url":"https://api.github.com/users/AbdullahAlger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AbdullahAlger/blocipedia","description":"","fork":false,"url":"https://api.github.com/repos/AbdullahAlger/blocipedia","forks_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/forks","keys_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/teams","hooks_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/hooks","issue_events_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/events{/number}","events_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/events","assignees_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/assignees{/user}","branches_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/branches{/branch}","tags_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/tags","blobs_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/refs{/sha}","trees_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/statuses/{sha}","languages_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/languages","stargazers_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/stargazers","contributors_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/contributors","subscribers_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/subscribers","subscription_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/subscription","commits_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/commits{/sha}","git_commits_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/commits{/sha}","comments_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/comments{/number}","issue_comment_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/comments{/number}","contents_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/contents/{+path}","compare_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/merges","archive_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/downloads","issues_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues{/number}","pulls_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls{/number}","milestones_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/milestones{/number}","notifications_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/labels{/name}","releases_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/releases{/id}","created_at":"2015-06-29T07:10:46Z","updated_at":"2015-06-29T07:13:51Z","pushed_at":"2015-07-23T10:24:04Z","git_url":"git://github.com/AbdullahAlger/blocipedia.git","ssh_url":"git@github.com:AbdullahAlger/blocipedia.git","clone_url":"https://github.com/AbdullahAlger/blocipedia.git","svn_url":"https://github.com/AbdullahAlger/blocipedia","homepage":null,"size":1936,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"AbdullahAlger:master","ref":"master","sha":"b19836e3a2ad8c97e1e7d86a75a2985f5728cc90","user":{"login":"AbdullahAlger","id":6264696,"avatar_url":"https://avatars.githubusercontent.com/u/6264696?v=3","gravatar_id":"","url":"https://api.github.com/users/AbdullahAlger","html_url":"https://github.com/AbdullahAlger","followers_url":"https://api.github.com/users/AbdullahAlger/followers","following_url":"https://api.github.com/users/AbdullahAlger/following{/other_user}","gists_url":"https://api.github.com/users/AbdullahAlger/gists{/gist_id}","starred_url":"https://api.github.com/users/AbdullahAlger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbdullahAlger/subscriptions","organizations_url":"https://api.github.com/users/AbdullahAlger/orgs","repos_url":"https://api.github.com/users/AbdullahAlger/repos","events_url":"https://api.github.com/users/AbdullahAlger/events{/privacy}","received_events_url":"https://api.github.com/users/AbdullahAlger/received_events","type":"User","site_admin":false},"repo":{"id":38232952,"name":"blocipedia","full_name":"AbdullahAlger/blocipedia","owner":{"login":"AbdullahAlger","id":6264696,"avatar_url":"https://avatars.githubusercontent.com/u/6264696?v=3","gravatar_id":"","url":"https://api.github.com/users/AbdullahAlger","html_url":"https://github.com/AbdullahAlger","followers_url":"https://api.github.com/users/AbdullahAlger/followers","following_url":"https://api.github.com/users/AbdullahAlger/following{/other_user}","gists_url":"https://api.github.com/users/AbdullahAlger/gists{/gist_id}","starred_url":"https://api.github.com/users/AbdullahAlger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbdullahAlger/subscriptions","organizations_url":"https://api.github.com/users/AbdullahAlger/orgs","repos_url":"https://api.github.com/users/AbdullahAlger/repos","events_url":"https://api.github.com/users/AbdullahAlger/events{/privacy}","received_events_url":"https://api.github.com/users/AbdullahAlger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AbdullahAlger/blocipedia","description":"","fork":false,"url":"https://api.github.com/repos/AbdullahAlger/blocipedia","forks_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/forks","keys_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/teams","hooks_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/hooks","issue_events_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/events{/number}","events_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/events","assignees_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/assignees{/user}","branches_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/branches{/branch}","tags_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/tags","blobs_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/refs{/sha}","trees_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/statuses/{sha}","languages_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/languages","stargazers_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/stargazers","contributors_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/contributors","subscribers_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/subscribers","subscription_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/subscription","commits_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/commits{/sha}","git_commits_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/git/commits{/sha}","comments_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/comments{/number}","issue_comment_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/comments{/number}","contents_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/contents/{+path}","compare_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/merges","archive_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/downloads","issues_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues{/number}","pulls_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls{/number}","milestones_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/milestones{/number}","notifications_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/labels{/name}","releases_url":"https://api.github.com/repos/AbdullahAlger/blocipedia/releases{/id}","created_at":"2015-06-29T07:10:46Z","updated_at":"2015-06-29T07:13:51Z","pushed_at":"2015-07-23T10:24:04Z","git_url":"git://github.com/AbdullahAlger/blocipedia.git","ssh_url":"git@github.com:AbdullahAlger/blocipedia.git","clone_url":"https://github.com/AbdullahAlger/blocipedia.git","svn_url":"https://github.com/AbdullahAlger/blocipedia","homepage":null,"size":1936,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/19"},"html":{"href":"https://github.com/AbdullahAlger/blocipedia/pull/19"},"issue":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/19"},"comments":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/AbdullahAlger/blocipedia/statuses/56db4e12c212fc3ddf5989b769ebc77a59b74798"}}}}