{"action":"created","comment":{"url":"https://api.github.com/repos/ulizko/new_flashcards/pulls/comments/73791131","id":73791131,"diff_hunk":"@@ -0,0 +1,66 @@\n+class ApplicationPolicy\n+  attr_reader :user, :record\n+\n+  def initialize(user, record)\n+    @user = user\n+    @record = record\n+  end\n+\n+  def create?\n+    @user.is_admin?\n+  end\n+\n+  def new?\n+    create?\n+  end\n+\n+  def update?\n+    @user.is_admin?\n+  end\n+\n+  def edit?\n+    update?\n+  end\n+\n+  def destroy?\n+    false\n+  end\n+\n+  def owner?\n+    @user.id == @record.user_id\n+  end\n+\n+  def method_missing(method_name)\n+    raise super unless actions.include? method_name[0..-2].to_sym\n+    @user.is_admin?\n+  end\n+\n+  def respond_to_missing?(method_name)\n+    actions.include? method_name[0..-2].to_sym || super","path":"app/policies/application_policy.rb","position":39,"original_position":39,"commit_id":"da8525d6a6bd219eca7bf915e58d4cd1b5357310","original_commit_id":"da8525d6a6bd219eca7bf915e58d4cd1b5357310","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Use parentheses in the method call to avoid confusion about precedence.","created_at":"2016-08-06T19:52:02Z","updated_at":"2016-08-06T19:52:02Z","html_url":"https://github.com/ulizko/new_flashcards/pull/3#discussion_r73791131","pull_request_url":"https://api.github.com/repos/ulizko/new_flashcards/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/ulizko/new_flashcards/pulls/comments/73791131"},"html":{"href":"https://github.com/ulizko/new_flashcards/pull/3#discussion_r73791131"},"pull_request":{"href":"https://api.github.com/repos/ulizko/new_flashcards/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/ulizko/new_flashcards/pulls/3","id":80274857,"html_url":"https://github.com/ulizko/new_flashcards/pull/3","diff_url":"https://github.com/ulizko/new_flashcards/pull/3.diff","patch_url":"https://github.com/ulizko/new_flashcards/pull/3.patch","issue_url":"https://api.github.com/repos/ulizko/new_flashcards/issues/3","number":3,"state":"open","locked":false,"title":"add admin","user":{"login":"ulizko","id":11588198,"avatar_url":"https://avatars.githubusercontent.com/u/11588198?v=3","gravatar_id":"","url":"https://api.github.com/users/ulizko","html_url":"https://github.com/ulizko","followers_url":"https://api.github.com/users/ulizko/followers","following_url":"https://api.github.com/users/ulizko/following{/other_user}","gists_url":"https://api.github.com/users/ulizko/gists{/gist_id}","starred_url":"https://api.github.com/users/ulizko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulizko/subscriptions","organizations_url":"https://api.github.com/users/ulizko/orgs","repos_url":"https://api.github.com/users/ulizko/repos","events_url":"https://api.github.com/users/ulizko/events{/privacy}","received_events_url":"https://api.github.com/users/ulizko/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-05T16:58:24Z","updated_at":"2016-08-06T19:52:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5abcb78d3834eacdf64fe12a2051d2ba1e8902f4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ulizko/new_flashcards/pulls/3/commits","review_comments_url":"https://api.github.com/repos/ulizko/new_flashcards/pulls/3/comments","review_comment_url":"https://api.github.com/repos/ulizko/new_flashcards/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ulizko/new_flashcards/issues/3/comments","statuses_url":"https://api.github.com/repos/ulizko/new_flashcards/statuses/da8525d6a6bd219eca7bf915e58d4cd1b5357310","head":{"label":"ulizko:Admin","ref":"Admin","sha":"da8525d6a6bd219eca7bf915e58d4cd1b5357310","user":{"login":"ulizko","id":11588198,"avatar_url":"https://avatars.githubusercontent.com/u/11588198?v=3","gravatar_id":"","url":"https://api.github.com/users/ulizko","html_url":"https://github.com/ulizko","followers_url":"https://api.github.com/users/ulizko/followers","following_url":"https://api.github.com/users/ulizko/following{/other_user}","gists_url":"https://api.github.com/users/ulizko/gists{/gist_id}","starred_url":"https://api.github.com/users/ulizko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulizko/subscriptions","organizations_url":"https://api.github.com/users/ulizko/orgs","repos_url":"https://api.github.com/users/ulizko/repos","events_url":"https://api.github.com/users/ulizko/events{/privacy}","received_events_url":"https://api.github.com/users/ulizko/received_events","type":"User","site_admin":false},"repo":{"id":63963347,"name":"new_flashcards","full_name":"ulizko/new_flashcards","owner":{"login":"ulizko","id":11588198,"avatar_url":"https://avatars.githubusercontent.com/u/11588198?v=3","gravatar_id":"","url":"https://api.github.com/users/ulizko","html_url":"https://github.com/ulizko","followers_url":"https://api.github.com/users/ulizko/followers","following_url":"https://api.github.com/users/ulizko/following{/other_user}","gists_url":"https://api.github.com/users/ulizko/gists{/gist_id}","starred_url":"https://api.github.com/users/ulizko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulizko/subscriptions","organizations_url":"https://api.github.com/users/ulizko/orgs","repos_url":"https://api.github.com/users/ulizko/repos","events_url":"https://api.github.com/users/ulizko/events{/privacy}","received_events_url":"https://api.github.com/users/ulizko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ulizko/new_flashcards","description":null,"fork":false,"url":"https://api.github.com/repos/ulizko/new_flashcards","forks_url":"https://api.github.com/repos/ulizko/new_flashcards/forks","keys_url":"https://api.github.com/repos/ulizko/new_flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ulizko/new_flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ulizko/new_flashcards/teams","hooks_url":"https://api.github.com/repos/ulizko/new_flashcards/hooks","issue_events_url":"https://api.github.com/repos/ulizko/new_flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/ulizko/new_flashcards/events","assignees_url":"https://api.github.com/repos/ulizko/new_flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/ulizko/new_flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/ulizko/new_flashcards/tags","blobs_url":"https://api.github.com/repos/ulizko/new_flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ulizko/new_flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ulizko/new_flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/ulizko/new_flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ulizko/new_flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/ulizko/new_flashcards/languages","stargazers_url":"https://api.github.com/repos/ulizko/new_flashcards/stargazers","contributors_url":"https://api.github.com/repos/ulizko/new_flashcards/contributors","subscribers_url":"https://api.github.com/repos/ulizko/new_flashcards/subscribers","subscription_url":"https://api.github.com/repos/ulizko/new_flashcards/subscription","commits_url":"https://api.github.com/repos/ulizko/new_flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/ulizko/new_flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/ulizko/new_flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/ulizko/new_flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/ulizko/new_flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/ulizko/new_flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ulizko/new_flashcards/merges","archive_url":"https://api.github.com/repos/ulizko/new_flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ulizko/new_flashcards/downloads","issues_url":"https://api.github.com/repos/ulizko/new_flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/ulizko/new_flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/ulizko/new_flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/ulizko/new_flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ulizko/new_flashcards/labels{/name}","releases_url":"https://api.github.com/repos/ulizko/new_flashcards/releases{/id}","deployments_url":"https://api.github.com/repos/ulizko/new_flashcards/deployments","created_at":"2016-07-22T15:20:53Z","updated_at":"2016-07-22T15:22:55Z","pushed_at":"2016-08-06T19:51:50Z","git_url":"git://github.com/ulizko/new_flashcards.git","ssh_url":"git@github.com:ulizko/new_flashcards.git","clone_url":"https://github.com/ulizko/new_flashcards.git","svn_url":"https://github.com/ulizko/new_flashcards","homepage":null,"size":124,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ulizko:master","ref":"master","sha":"ac37daf2185a1537c0437637d31829e89fe72476","user":{"login":"ulizko","id":11588198,"avatar_url":"https://avatars.githubusercontent.com/u/11588198?v=3","gravatar_id":"","url":"https://api.github.com/users/ulizko","html_url":"https://github.com/ulizko","followers_url":"https://api.github.com/users/ulizko/followers","following_url":"https://api.github.com/users/ulizko/following{/other_user}","gists_url":"https://api.github.com/users/ulizko/gists{/gist_id}","starred_url":"https://api.github.com/users/ulizko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulizko/subscriptions","organizations_url":"https://api.github.com/users/ulizko/orgs","repos_url":"https://api.github.com/users/ulizko/repos","events_url":"https://api.github.com/users/ulizko/events{/privacy}","received_events_url":"https://api.github.com/users/ulizko/received_events","type":"User","site_admin":false},"repo":{"id":63963347,"name":"new_flashcards","full_name":"ulizko/new_flashcards","owner":{"login":"ulizko","id":11588198,"avatar_url":"https://avatars.githubusercontent.com/u/11588198?v=3","gravatar_id":"","url":"https://api.github.com/users/ulizko","html_url":"https://github.com/ulizko","followers_url":"https://api.github.com/users/ulizko/followers","following_url":"https://api.github.com/users/ulizko/following{/other_user}","gists_url":"https://api.github.com/users/ulizko/gists{/gist_id}","starred_url":"https://api.github.com/users/ulizko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulizko/subscriptions","organizations_url":"https://api.github.com/users/ulizko/orgs","repos_url":"https://api.github.com/users/ulizko/repos","events_url":"https://api.github.com/users/ulizko/events{/privacy}","received_events_url":"https://api.github.com/users/ulizko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ulizko/new_flashcards","description":null,"fork":false,"url":"https://api.github.com/repos/ulizko/new_flashcards","forks_url":"https://api.github.com/repos/ulizko/new_flashcards/forks","keys_url":"https://api.github.com/repos/ulizko/new_flashcards/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ulizko/new_flashcards/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ulizko/new_flashcards/teams","hooks_url":"https://api.github.com/repos/ulizko/new_flashcards/hooks","issue_events_url":"https://api.github.com/repos/ulizko/new_flashcards/issues/events{/number}","events_url":"https://api.github.com/repos/ulizko/new_flashcards/events","assignees_url":"https://api.github.com/repos/ulizko/new_flashcards/assignees{/user}","branches_url":"https://api.github.com/repos/ulizko/new_flashcards/branches{/branch}","tags_url":"https://api.github.com/repos/ulizko/new_flashcards/tags","blobs_url":"https://api.github.com/repos/ulizko/new_flashcards/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ulizko/new_flashcards/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ulizko/new_flashcards/git/refs{/sha}","trees_url":"https://api.github.com/repos/ulizko/new_flashcards/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ulizko/new_flashcards/statuses/{sha}","languages_url":"https://api.github.com/repos/ulizko/new_flashcards/languages","stargazers_url":"https://api.github.com/repos/ulizko/new_flashcards/stargazers","contributors_url":"https://api.github.com/repos/ulizko/new_flashcards/contributors","subscribers_url":"https://api.github.com/repos/ulizko/new_flashcards/subscribers","subscription_url":"https://api.github.com/repos/ulizko/new_flashcards/subscription","commits_url":"https://api.github.com/repos/ulizko/new_flashcards/commits{/sha}","git_commits_url":"https://api.github.com/repos/ulizko/new_flashcards/git/commits{/sha}","comments_url":"https://api.github.com/repos/ulizko/new_flashcards/comments{/number}","issue_comment_url":"https://api.github.com/repos/ulizko/new_flashcards/issues/comments{/number}","contents_url":"https://api.github.com/repos/ulizko/new_flashcards/contents/{+path}","compare_url":"https://api.github.com/repos/ulizko/new_flashcards/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ulizko/new_flashcards/merges","archive_url":"https://api.github.com/repos/ulizko/new_flashcards/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ulizko/new_flashcards/downloads","issues_url":"https://api.github.com/repos/ulizko/new_flashcards/issues{/number}","pulls_url":"https://api.github.com/repos/ulizko/new_flashcards/pulls{/number}","milestones_url":"https://api.github.com/repos/ulizko/new_flashcards/milestones{/number}","notifications_url":"https://api.github.com/repos/ulizko/new_flashcards/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ulizko/new_flashcards/labels{/name}","releases_url":"https://api.github.com/repos/ulizko/new_flashcards/releases{/id}","deployments_url":"https://api.github.com/repos/ulizko/new_flashcards/deployments","created_at":"2016-07-22T15:20:53Z","updated_at":"2016-07-22T15:22:55Z","pushed_at":"2016-08-06T19:51:50Z","git_url":"git://github.com/ulizko/new_flashcards.git","ssh_url":"git@github.com:ulizko/new_flashcards.git","clone_url":"https://github.com/ulizko/new_flashcards.git","svn_url":"https://github.com/ulizko/new_flashcards","homepage":null,"size":124,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ulizko/new_flashcards/pulls/3"},"html":{"href":"https://github.com/ulizko/new_flashcards/pull/3"},"issue":{"href":"https://api.github.com/repos/ulizko/new_flashcards/issues/3"},"comments":{"href":"https://api.github.com/repos/ulizko/new_flashcards/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/ulizko/new_flashcards/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/ulizko/new_flashcards/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ulizko/new_flashcards/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/ulizko/new_flashcards/statuses/da8525d6a6bd219eca7bf915e58d4cd1b5357310"}}}}
{"actor":{"display_login":"houndci-bot"}}