{"action":"created","comment":{"url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/pulls/comments/82440917","pull_request_review_id":3350850,"id":82440917,"diff_hunk":"@@ -1,7 +1,54 @@\n class UsersController < ApplicationController\n   before_action :authenticate_user!\n \n+  def index\n+    if current_user.try(:admin?)\n+      @users = User.all.order(created_at: :asc)\n+    else\n+      render(file: File.join(Rails.root, 'public/403.html'), status: 403, layout: false)","path":"app/controllers/users_controller.rb","position":8,"original_position":8,"commit_id":"77544f3f05df676eb7b431b65637a9274960c681","original_commit_id":"77544f3f05df676eb7b431b65637a9274960c681","user":{"login":"alxjrvs","id":174825,"avatar_url":"https://avatars.githubusercontent.com/u/174825?v=3","gravatar_id":"","url":"https://api.github.com/users/alxjrvs","html_url":"https://github.com/alxjrvs","followers_url":"https://api.github.com/users/alxjrvs/followers","following_url":"https://api.github.com/users/alxjrvs/following{/other_user}","gists_url":"https://api.github.com/users/alxjrvs/gists{/gist_id}","starred_url":"https://api.github.com/users/alxjrvs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alxjrvs/subscriptions","organizations_url":"https://api.github.com/users/alxjrvs/orgs","repos_url":"https://api.github.com/users/alxjrvs/repos","events_url":"https://api.github.com/users/alxjrvs/events{/privacy}","received_events_url":"https://api.github.com/users/alxjrvs/received_events","type":"User","site_admin":false},"body":"iiiiIIIIIIiiiiinteresting. This is an unconventional way to do this, but is totally valid. Consider breaking some of this into private methods to make it less of a giant line. ","created_at":"2016-10-07T18:09:21Z","updated_at":"2016-10-07T18:11:27Z","html_url":"https://github.com/MarcvanMelle/flylikeag9/pull/28#discussion_r82440917","pull_request_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/MarcvanMelle/flylikeag9/pulls/comments/82440917"},"html":{"href":"https://github.com/MarcvanMelle/flylikeag9/pull/28#discussion_r82440917"},"pull_request":{"href":"https://api.github.com/repos/MarcvanMelle/flylikeag9/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/pulls/28","id":88423567,"html_url":"https://github.com/MarcvanMelle/flylikeag9/pull/28","diff_url":"https://github.com/MarcvanMelle/flylikeag9/pull/28.diff","patch_url":"https://github.com/MarcvanMelle/flylikeag9/pull/28.patch","issue_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/issues/28","number":28,"state":"open","locked":false,"title":"Admin user controll","user":{"login":"MarcvanMelle","id":20194269,"avatar_url":"https://avatars.githubusercontent.com/u/20194269?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcvanMelle","html_url":"https://github.com/MarcvanMelle","followers_url":"https://api.github.com/users/MarcvanMelle/followers","following_url":"https://api.github.com/users/MarcvanMelle/following{/other_user}","gists_url":"https://api.github.com/users/MarcvanMelle/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcvanMelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcvanMelle/subscriptions","organizations_url":"https://api.github.com/users/MarcvanMelle/orgs","repos_url":"https://api.github.com/users/MarcvanMelle/repos","events_url":"https://api.github.com/users/MarcvanMelle/events{/privacy}","received_events_url":"https://api.github.com/users/MarcvanMelle/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-07T11:40:28Z","updated_at":"2016-10-07T18:11:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1d390ed10697d81db0f6bb3ae9426dd62914c60c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/pulls/28/commits","review_comments_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/pulls/28/comments","review_comment_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/issues/28/comments","statuses_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/statuses/77544f3f05df676eb7b431b65637a9274960c681","head":{"label":"MarcvanMelle:admin_user_controll","ref":"admin_user_controll","sha":"77544f3f05df676eb7b431b65637a9274960c681","user":{"login":"MarcvanMelle","id":20194269,"avatar_url":"https://avatars.githubusercontent.com/u/20194269?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcvanMelle","html_url":"https://github.com/MarcvanMelle","followers_url":"https://api.github.com/users/MarcvanMelle/followers","following_url":"https://api.github.com/users/MarcvanMelle/following{/other_user}","gists_url":"https://api.github.com/users/MarcvanMelle/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcvanMelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcvanMelle/subscriptions","organizations_url":"https://api.github.com/users/MarcvanMelle/orgs","repos_url":"https://api.github.com/users/MarcvanMelle/repos","events_url":"https://api.github.com/users/MarcvanMelle/events{/privacy}","received_events_url":"https://api.github.com/users/MarcvanMelle/received_events","type":"User","site_admin":false},"repo":{"id":69880268,"name":"flylikeag9","full_name":"MarcvanMelle/flylikeag9","owner":{"login":"MarcvanMelle","id":20194269,"avatar_url":"https://avatars.githubusercontent.com/u/20194269?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcvanMelle","html_url":"https://github.com/MarcvanMelle","followers_url":"https://api.github.com/users/MarcvanMelle/followers","following_url":"https://api.github.com/users/MarcvanMelle/following{/other_user}","gists_url":"https://api.github.com/users/MarcvanMelle/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcvanMelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcvanMelle/subscriptions","organizations_url":"https://api.github.com/users/MarcvanMelle/orgs","repos_url":"https://api.github.com/users/MarcvanMelle/repos","events_url":"https://api.github.com/users/MarcvanMelle/events{/privacy}","received_events_url":"https://api.github.com/users/MarcvanMelle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MarcvanMelle/flylikeag9","description":null,"fork":false,"url":"https://api.github.com/repos/MarcvanMelle/flylikeag9","forks_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/forks","keys_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/teams","hooks_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/hooks","issue_events_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/issues/events{/number}","events_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/events","assignees_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/assignees{/user}","branches_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/branches{/branch}","tags_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/tags","blobs_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/git/refs{/sha}","trees_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/statuses/{sha}","languages_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/languages","stargazers_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/stargazers","contributors_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/contributors","subscribers_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/subscribers","subscription_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/subscription","commits_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/commits{/sha}","git_commits_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/git/commits{/sha}","comments_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/comments{/number}","issue_comment_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/issues/comments{/number}","contents_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/contents/{+path}","compare_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/merges","archive_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/downloads","issues_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/issues{/number}","pulls_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/pulls{/number}","milestones_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/milestones{/number}","notifications_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/labels{/name}","releases_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/releases{/id}","deployments_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/deployments","created_at":"2016-10-03T14:45:16Z","updated_at":"2016-10-03T15:10:05Z","pushed_at":"2016-10-07T18:08:47Z","git_url":"git://github.com/MarcvanMelle/flylikeag9.git","ssh_url":"git@github.com:MarcvanMelle/flylikeag9.git","clone_url":"https://github.com/MarcvanMelle/flylikeag9.git","svn_url":"https://github.com/MarcvanMelle/flylikeag9","homepage":null,"size":168,"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":"MarcvanMelle:master","ref":"master","sha":"0edabf84ca014a663cf25b6b0f2d5fdc0d6e9f5f","user":{"login":"MarcvanMelle","id":20194269,"avatar_url":"https://avatars.githubusercontent.com/u/20194269?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcvanMelle","html_url":"https://github.com/MarcvanMelle","followers_url":"https://api.github.com/users/MarcvanMelle/followers","following_url":"https://api.github.com/users/MarcvanMelle/following{/other_user}","gists_url":"https://api.github.com/users/MarcvanMelle/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcvanMelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcvanMelle/subscriptions","organizations_url":"https://api.github.com/users/MarcvanMelle/orgs","repos_url":"https://api.github.com/users/MarcvanMelle/repos","events_url":"https://api.github.com/users/MarcvanMelle/events{/privacy}","received_events_url":"https://api.github.com/users/MarcvanMelle/received_events","type":"User","site_admin":false},"repo":{"id":69880268,"name":"flylikeag9","full_name":"MarcvanMelle/flylikeag9","owner":{"login":"MarcvanMelle","id":20194269,"avatar_url":"https://avatars.githubusercontent.com/u/20194269?v=3","gravatar_id":"","url":"https://api.github.com/users/MarcvanMelle","html_url":"https://github.com/MarcvanMelle","followers_url":"https://api.github.com/users/MarcvanMelle/followers","following_url":"https://api.github.com/users/MarcvanMelle/following{/other_user}","gists_url":"https://api.github.com/users/MarcvanMelle/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcvanMelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcvanMelle/subscriptions","organizations_url":"https://api.github.com/users/MarcvanMelle/orgs","repos_url":"https://api.github.com/users/MarcvanMelle/repos","events_url":"https://api.github.com/users/MarcvanMelle/events{/privacy}","received_events_url":"https://api.github.com/users/MarcvanMelle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MarcvanMelle/flylikeag9","description":null,"fork":false,"url":"https://api.github.com/repos/MarcvanMelle/flylikeag9","forks_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/forks","keys_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/teams","hooks_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/hooks","issue_events_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/issues/events{/number}","events_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/events","assignees_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/assignees{/user}","branches_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/branches{/branch}","tags_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/tags","blobs_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/git/refs{/sha}","trees_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/statuses/{sha}","languages_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/languages","stargazers_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/stargazers","contributors_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/contributors","subscribers_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/subscribers","subscription_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/subscription","commits_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/commits{/sha}","git_commits_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/git/commits{/sha}","comments_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/comments{/number}","issue_comment_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/issues/comments{/number}","contents_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/contents/{+path}","compare_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/merges","archive_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/downloads","issues_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/issues{/number}","pulls_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/pulls{/number}","milestones_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/milestones{/number}","notifications_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/labels{/name}","releases_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/releases{/id}","deployments_url":"https://api.github.com/repos/MarcvanMelle/flylikeag9/deployments","created_at":"2016-10-03T14:45:16Z","updated_at":"2016-10-03T15:10:05Z","pushed_at":"2016-10-07T18:08:47Z","git_url":"git://github.com/MarcvanMelle/flylikeag9.git","ssh_url":"git@github.com:MarcvanMelle/flylikeag9.git","clone_url":"https://github.com/MarcvanMelle/flylikeag9.git","svn_url":"https://github.com/MarcvanMelle/flylikeag9","homepage":null,"size":168,"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/MarcvanMelle/flylikeag9/pulls/28"},"html":{"href":"https://github.com/MarcvanMelle/flylikeag9/pull/28"},"issue":{"href":"https://api.github.com/repos/MarcvanMelle/flylikeag9/issues/28"},"comments":{"href":"https://api.github.com/repos/MarcvanMelle/flylikeag9/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/MarcvanMelle/flylikeag9/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/MarcvanMelle/flylikeag9/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MarcvanMelle/flylikeag9/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/MarcvanMelle/flylikeag9/statuses/77544f3f05df676eb7b431b65637a9274960c681"}}}}
{"actor":{"display_login":"alxjrvs"}}