{"action":"created","comment":{"url":"https://api.github.com/repos/kahlya/ruby-try-three/pulls/comments/23180040","id":23180040,"diff_hunk":"@@ -0,0 +1,12 @@\n+class Ability\n+  include CanCan::Ability\n+\n+  def initialize(user)\n+    user ||= User.new\n+    if user.is_admin?\n+      can :manage, Article","path":"app/models/ability.rb","position":7,"original_position":7,"commit_id":"c2ad9027a29bca4d1e0cbacae9bf8a7c96a5bd75","original_commit_id":"c2ad9027a29bca4d1e0cbacae9bf8a7c96a5bd75","user":{"login":"fiestacasey","id":1323524,"avatar_url":"https://avatars.githubusercontent.com/u/1323524?v=3","gravatar_id":"","url":"https://api.github.com/users/fiestacasey","html_url":"https://github.com/fiestacasey","followers_url":"https://api.github.com/users/fiestacasey/followers","following_url":"https://api.github.com/users/fiestacasey/following{/other_user}","gists_url":"https://api.github.com/users/fiestacasey/gists{/gist_id}","starred_url":"https://api.github.com/users/fiestacasey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fiestacasey/subscriptions","organizations_url":"https://api.github.com/users/fiestacasey/orgs","repos_url":"https://api.github.com/users/fiestacasey/repos","events_url":"https://api.github.com/users/fiestacasey/events{/privacy}","received_events_url":"https://api.github.com/users/fiestacasey/received_events","type":"User","site_admin":false},"body":"admin's should probably only be allowed to manage their own articles? ","created_at":"2015-01-19T19:08:32Z","updated_at":"2015-01-19T19:08:32Z","html_url":"https://github.com/kahlya/ruby-try-three/pull/4#discussion_r23180040","pull_request_url":"https://api.github.com/repos/kahlya/ruby-try-three/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/kahlya/ruby-try-three/pulls/comments/23180040"},"html":{"href":"https://github.com/kahlya/ruby-try-three/pull/4#discussion_r23180040"},"pull_request":{"href":"https://api.github.com/repos/kahlya/ruby-try-three/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/kahlya/ruby-try-three/pulls/4","id":27627615,"html_url":"https://github.com/kahlya/ruby-try-three/pull/4","diff_url":"https://github.com/kahlya/ruby-try-three/pull/4.diff","patch_url":"https://github.com/kahlya/ruby-try-three/pull/4.patch","issue_url":"https://api.github.com/repos/kahlya/ruby-try-three/issues/4","number":4,"state":"open","locked":false,"title":"Api","user":{"login":"kahlya","id":6626544,"avatar_url":"https://avatars.githubusercontent.com/u/6626544?v=3","gravatar_id":"","url":"https://api.github.com/users/kahlya","html_url":"https://github.com/kahlya","followers_url":"https://api.github.com/users/kahlya/followers","following_url":"https://api.github.com/users/kahlya/following{/other_user}","gists_url":"https://api.github.com/users/kahlya/gists{/gist_id}","starred_url":"https://api.github.com/users/kahlya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kahlya/subscriptions","organizations_url":"https://api.github.com/users/kahlya/orgs","repos_url":"https://api.github.com/users/kahlya/repos","events_url":"https://api.github.com/users/kahlya/events{/privacy}","received_events_url":"https://api.github.com/users/kahlya/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-19T18:45:36Z","updated_at":"2015-01-19T19:08:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0c5d8b3701413a1a906d4d9168a4fad9014843b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kahlya/ruby-try-three/pulls/4/commits","review_comments_url":"https://api.github.com/repos/kahlya/ruby-try-three/pulls/4/comments","review_comment_url":"https://api.github.com/repos/kahlya/ruby-try-three/pulls/comments/{number}","comments_url":"https://api.github.com/repos/kahlya/ruby-try-three/issues/4/comments","statuses_url":"https://api.github.com/repos/kahlya/ruby-try-three/statuses/c2ad9027a29bca4d1e0cbacae9bf8a7c96a5bd75","head":{"label":"kahlya:api","ref":"api","sha":"c2ad9027a29bca4d1e0cbacae9bf8a7c96a5bd75","user":{"login":"kahlya","id":6626544,"avatar_url":"https://avatars.githubusercontent.com/u/6626544?v=3","gravatar_id":"","url":"https://api.github.com/users/kahlya","html_url":"https://github.com/kahlya","followers_url":"https://api.github.com/users/kahlya/followers","following_url":"https://api.github.com/users/kahlya/following{/other_user}","gists_url":"https://api.github.com/users/kahlya/gists{/gist_id}","starred_url":"https://api.github.com/users/kahlya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kahlya/subscriptions","organizations_url":"https://api.github.com/users/kahlya/orgs","repos_url":"https://api.github.com/users/kahlya/repos","events_url":"https://api.github.com/users/kahlya/events{/privacy}","received_events_url":"https://api.github.com/users/kahlya/received_events","type":"User","site_admin":false},"repo":{"id":29031860,"name":"ruby-try-three","full_name":"kahlya/ruby-try-three","owner":{"login":"kahlya","id":6626544,"avatar_url":"https://avatars.githubusercontent.com/u/6626544?v=3","gravatar_id":"","url":"https://api.github.com/users/kahlya","html_url":"https://github.com/kahlya","followers_url":"https://api.github.com/users/kahlya/followers","following_url":"https://api.github.com/users/kahlya/following{/other_user}","gists_url":"https://api.github.com/users/kahlya/gists{/gist_id}","starred_url":"https://api.github.com/users/kahlya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kahlya/subscriptions","organizations_url":"https://api.github.com/users/kahlya/orgs","repos_url":"https://api.github.com/users/kahlya/repos","events_url":"https://api.github.com/users/kahlya/events{/privacy}","received_events_url":"https://api.github.com/users/kahlya/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kahlya/ruby-try-three","description":null,"fork":false,"url":"https://api.github.com/repos/kahlya/ruby-try-three","forks_url":"https://api.github.com/repos/kahlya/ruby-try-three/forks","keys_url":"https://api.github.com/repos/kahlya/ruby-try-three/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kahlya/ruby-try-three/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kahlya/ruby-try-three/teams","hooks_url":"https://api.github.com/repos/kahlya/ruby-try-three/hooks","issue_events_url":"https://api.github.com/repos/kahlya/ruby-try-three/issues/events{/number}","events_url":"https://api.github.com/repos/kahlya/ruby-try-three/events","assignees_url":"https://api.github.com/repos/kahlya/ruby-try-three/assignees{/user}","branches_url":"https://api.github.com/repos/kahlya/ruby-try-three/branches{/branch}","tags_url":"https://api.github.com/repos/kahlya/ruby-try-three/tags","blobs_url":"https://api.github.com/repos/kahlya/ruby-try-three/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kahlya/ruby-try-three/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kahlya/ruby-try-three/git/refs{/sha}","trees_url":"https://api.github.com/repos/kahlya/ruby-try-three/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kahlya/ruby-try-three/statuses/{sha}","languages_url":"https://api.github.com/repos/kahlya/ruby-try-three/languages","stargazers_url":"https://api.github.com/repos/kahlya/ruby-try-three/stargazers","contributors_url":"https://api.github.com/repos/kahlya/ruby-try-three/contributors","subscribers_url":"https://api.github.com/repos/kahlya/ruby-try-three/subscribers","subscription_url":"https://api.github.com/repos/kahlya/ruby-try-three/subscription","commits_url":"https://api.github.com/repos/kahlya/ruby-try-three/commits{/sha}","git_commits_url":"https://api.github.com/repos/kahlya/ruby-try-three/git/commits{/sha}","comments_url":"https://api.github.com/repos/kahlya/ruby-try-three/comments{/number}","issue_comment_url":"https://api.github.com/repos/kahlya/ruby-try-three/issues/comments/{number}","contents_url":"https://api.github.com/repos/kahlya/ruby-try-three/contents/{+path}","compare_url":"https://api.github.com/repos/kahlya/ruby-try-three/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kahlya/ruby-try-three/merges","archive_url":"https://api.github.com/repos/kahlya/ruby-try-three/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kahlya/ruby-try-three/downloads","issues_url":"https://api.github.com/repos/kahlya/ruby-try-three/issues{/number}","pulls_url":"https://api.github.com/repos/kahlya/ruby-try-three/pulls{/number}","milestones_url":"https://api.github.com/repos/kahlya/ruby-try-three/milestones{/number}","notifications_url":"https://api.github.com/repos/kahlya/ruby-try-three/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kahlya/ruby-try-three/labels{/name}","releases_url":"https://api.github.com/repos/kahlya/ruby-try-three/releases{/id}","created_at":"2015-01-09T19:32:46Z","updated_at":"2015-01-12T19:57:17Z","pushed_at":"2015-01-19T18:44:36Z","git_url":"git://github.com/kahlya/ruby-try-three.git","ssh_url":"git@github.com:kahlya/ruby-try-three.git","clone_url":"https://github.com/kahlya/ruby-try-three.git","svn_url":"https://github.com/kahlya/ruby-try-three","homepage":null,"size":1444,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"kahlya:master","ref":"master","sha":"38a3092aa91791f0089470c2e8e03b42b4609fb8","user":{"login":"kahlya","id":6626544,"avatar_url":"https://avatars.githubusercontent.com/u/6626544?v=3","gravatar_id":"","url":"https://api.github.com/users/kahlya","html_url":"https://github.com/kahlya","followers_url":"https://api.github.com/users/kahlya/followers","following_url":"https://api.github.com/users/kahlya/following{/other_user}","gists_url":"https://api.github.com/users/kahlya/gists{/gist_id}","starred_url":"https://api.github.com/users/kahlya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kahlya/subscriptions","organizations_url":"https://api.github.com/users/kahlya/orgs","repos_url":"https://api.github.com/users/kahlya/repos","events_url":"https://api.github.com/users/kahlya/events{/privacy}","received_events_url":"https://api.github.com/users/kahlya/received_events","type":"User","site_admin":false},"repo":{"id":29031860,"name":"ruby-try-three","full_name":"kahlya/ruby-try-three","owner":{"login":"kahlya","id":6626544,"avatar_url":"https://avatars.githubusercontent.com/u/6626544?v=3","gravatar_id":"","url":"https://api.github.com/users/kahlya","html_url":"https://github.com/kahlya","followers_url":"https://api.github.com/users/kahlya/followers","following_url":"https://api.github.com/users/kahlya/following{/other_user}","gists_url":"https://api.github.com/users/kahlya/gists{/gist_id}","starred_url":"https://api.github.com/users/kahlya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kahlya/subscriptions","organizations_url":"https://api.github.com/users/kahlya/orgs","repos_url":"https://api.github.com/users/kahlya/repos","events_url":"https://api.github.com/users/kahlya/events{/privacy}","received_events_url":"https://api.github.com/users/kahlya/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kahlya/ruby-try-three","description":null,"fork":false,"url":"https://api.github.com/repos/kahlya/ruby-try-three","forks_url":"https://api.github.com/repos/kahlya/ruby-try-three/forks","keys_url":"https://api.github.com/repos/kahlya/ruby-try-three/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kahlya/ruby-try-three/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kahlya/ruby-try-three/teams","hooks_url":"https://api.github.com/repos/kahlya/ruby-try-three/hooks","issue_events_url":"https://api.github.com/repos/kahlya/ruby-try-three/issues/events{/number}","events_url":"https://api.github.com/repos/kahlya/ruby-try-three/events","assignees_url":"https://api.github.com/repos/kahlya/ruby-try-three/assignees{/user}","branches_url":"https://api.github.com/repos/kahlya/ruby-try-three/branches{/branch}","tags_url":"https://api.github.com/repos/kahlya/ruby-try-three/tags","blobs_url":"https://api.github.com/repos/kahlya/ruby-try-three/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kahlya/ruby-try-three/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kahlya/ruby-try-three/git/refs{/sha}","trees_url":"https://api.github.com/repos/kahlya/ruby-try-three/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kahlya/ruby-try-three/statuses/{sha}","languages_url":"https://api.github.com/repos/kahlya/ruby-try-three/languages","stargazers_url":"https://api.github.com/repos/kahlya/ruby-try-three/stargazers","contributors_url":"https://api.github.com/repos/kahlya/ruby-try-three/contributors","subscribers_url":"https://api.github.com/repos/kahlya/ruby-try-three/subscribers","subscription_url":"https://api.github.com/repos/kahlya/ruby-try-three/subscription","commits_url":"https://api.github.com/repos/kahlya/ruby-try-three/commits{/sha}","git_commits_url":"https://api.github.com/repos/kahlya/ruby-try-three/git/commits{/sha}","comments_url":"https://api.github.com/repos/kahlya/ruby-try-three/comments{/number}","issue_comment_url":"https://api.github.com/repos/kahlya/ruby-try-three/issues/comments/{number}","contents_url":"https://api.github.com/repos/kahlya/ruby-try-three/contents/{+path}","compare_url":"https://api.github.com/repos/kahlya/ruby-try-three/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kahlya/ruby-try-three/merges","archive_url":"https://api.github.com/repos/kahlya/ruby-try-three/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kahlya/ruby-try-three/downloads","issues_url":"https://api.github.com/repos/kahlya/ruby-try-three/issues{/number}","pulls_url":"https://api.github.com/repos/kahlya/ruby-try-three/pulls{/number}","milestones_url":"https://api.github.com/repos/kahlya/ruby-try-three/milestones{/number}","notifications_url":"https://api.github.com/repos/kahlya/ruby-try-three/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kahlya/ruby-try-three/labels{/name}","releases_url":"https://api.github.com/repos/kahlya/ruby-try-three/releases{/id}","created_at":"2015-01-09T19:32:46Z","updated_at":"2015-01-12T19:57:17Z","pushed_at":"2015-01-19T18:44:36Z","git_url":"git://github.com/kahlya/ruby-try-three.git","ssh_url":"git@github.com:kahlya/ruby-try-three.git","clone_url":"https://github.com/kahlya/ruby-try-three.git","svn_url":"https://github.com/kahlya/ruby-try-three","homepage":null,"size":1444,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kahlya/ruby-try-three/pulls/4"},"html":{"href":"https://github.com/kahlya/ruby-try-three/pull/4"},"issue":{"href":"https://api.github.com/repos/kahlya/ruby-try-three/issues/4"},"comments":{"href":"https://api.github.com/repos/kahlya/ruby-try-three/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/kahlya/ruby-try-three/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/kahlya/ruby-try-three/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/kahlya/ruby-try-three/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/kahlya/ruby-try-three/statuses/c2ad9027a29bca4d1e0cbacae9bf8a7c96a5bd75"}}}}