{"action":"created","comment":{"url":"https://api.github.com/repos/bialy358/cwiczenie/pulls/comments/52874562","id":52874562,"diff_hunk":"@@ -0,0 +1,16 @@\n+class AdminController < ApplicationController\n+\n+  before_action :require_admin\n+\n+  def index\n+  end\n+\n+  private\n+\n+  def require_admin\n+    return if current_user && current_user.admin\n+    flash[:error] = 'Entrance permited. Admin require'","path":"app/controllers/admin_controller.rb","position":12,"original_position":12,"commit_id":"227e3bda766ee1b4abfbec8a02b53642e7042e4e","original_commit_id":"227e3bda766ee1b4abfbec8a02b53642e7042e4e","user":{"login":"bialy358","id":13016007,"avatar_url":"https://avatars.githubusercontent.com/u/13016007?v=3","gravatar_id":"","url":"https://api.github.com/users/bialy358","html_url":"https://github.com/bialy358","followers_url":"https://api.github.com/users/bialy358/followers","following_url":"https://api.github.com/users/bialy358/following{/other_user}","gists_url":"https://api.github.com/users/bialy358/gists{/gist_id}","starred_url":"https://api.github.com/users/bialy358/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bialy358/subscriptions","organizations_url":"https://api.github.com/users/bialy358/orgs","repos_url":"https://api.github.com/users/bialy358/repos","events_url":"https://api.github.com/users/bialy358/events{/privacy}","received_events_url":"https://api.github.com/users/bialy358/received_events","type":"User","site_admin":false},"body":"flash.now is used when we render not redirect :P?","created_at":"2016-02-15T09:15:46Z","updated_at":"2016-02-15T09:15:46Z","html_url":"https://github.com/bialy358/cwiczenie/pull/1#discussion_r52874562","pull_request_url":"https://api.github.com/repos/bialy358/cwiczenie/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/bialy358/cwiczenie/pulls/comments/52874562"},"html":{"href":"https://github.com/bialy358/cwiczenie/pull/1#discussion_r52874562"},"pull_request":{"href":"https://api.github.com/repos/bialy358/cwiczenie/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/bialy358/cwiczenie/pulls/1","id":59029121,"html_url":"https://github.com/bialy358/cwiczenie/pull/1","diff_url":"https://github.com/bialy358/cwiczenie/pull/1.diff","patch_url":"https://github.com/bialy358/cwiczenie/pull/1.patch","issue_url":"https://api.github.com/repos/bialy358/cwiczenie/issues/1","number":1,"state":"open","locked":false,"title":"add admin column in User","user":{"login":"bialy358","id":13016007,"avatar_url":"https://avatars.githubusercontent.com/u/13016007?v=3","gravatar_id":"","url":"https://api.github.com/users/bialy358","html_url":"https://github.com/bialy358","followers_url":"https://api.github.com/users/bialy358/followers","following_url":"https://api.github.com/users/bialy358/following{/other_user}","gists_url":"https://api.github.com/users/bialy358/gists{/gist_id}","starred_url":"https://api.github.com/users/bialy358/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bialy358/subscriptions","organizations_url":"https://api.github.com/users/bialy358/orgs","repos_url":"https://api.github.com/users/bialy358/repos","events_url":"https://api.github.com/users/bialy358/events{/privacy}","received_events_url":"https://api.github.com/users/bialy358/received_events","type":"User","site_admin":false},"body":"## TODO\r\n* [x] add admin column for users\r\n* [x] add admin layout\r\n* [x] add bootstrap to admin layout\r\n![layout](https://cloud.githubusercontent.com/assets/13016007/13005005/619888cc-d17f-11e5-9eda-c4194d399830.png)\r\n","created_at":"2016-02-11T13:19:36Z","updated_at":"2016-02-15T09:15:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"28f1e0283b35ab098a4e526fd236c18db9b9a967","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bialy358/cwiczenie/pulls/1/commits","review_comments_url":"https://api.github.com/repos/bialy358/cwiczenie/pulls/1/comments","review_comment_url":"https://api.github.com/repos/bialy358/cwiczenie/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bialy358/cwiczenie/issues/1/comments","statuses_url":"https://api.github.com/repos/bialy358/cwiczenie/statuses/227e3bda766ee1b4abfbec8a02b53642e7042e4e","head":{"label":"bialy358:admin","ref":"admin","sha":"227e3bda766ee1b4abfbec8a02b53642e7042e4e","user":{"login":"bialy358","id":13016007,"avatar_url":"https://avatars.githubusercontent.com/u/13016007?v=3","gravatar_id":"","url":"https://api.github.com/users/bialy358","html_url":"https://github.com/bialy358","followers_url":"https://api.github.com/users/bialy358/followers","following_url":"https://api.github.com/users/bialy358/following{/other_user}","gists_url":"https://api.github.com/users/bialy358/gists{/gist_id}","starred_url":"https://api.github.com/users/bialy358/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bialy358/subscriptions","organizations_url":"https://api.github.com/users/bialy358/orgs","repos_url":"https://api.github.com/users/bialy358/repos","events_url":"https://api.github.com/users/bialy358/events{/privacy}","received_events_url":"https://api.github.com/users/bialy358/received_events","type":"User","site_admin":false},"repo":{"id":51375937,"name":"cwiczenie","full_name":"bialy358/cwiczenie","owner":{"login":"bialy358","id":13016007,"avatar_url":"https://avatars.githubusercontent.com/u/13016007?v=3","gravatar_id":"","url":"https://api.github.com/users/bialy358","html_url":"https://github.com/bialy358","followers_url":"https://api.github.com/users/bialy358/followers","following_url":"https://api.github.com/users/bialy358/following{/other_user}","gists_url":"https://api.github.com/users/bialy358/gists{/gist_id}","starred_url":"https://api.github.com/users/bialy358/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bialy358/subscriptions","organizations_url":"https://api.github.com/users/bialy358/orgs","repos_url":"https://api.github.com/users/bialy358/repos","events_url":"https://api.github.com/users/bialy358/events{/privacy}","received_events_url":"https://api.github.com/users/bialy358/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bialy358/cwiczenie","description":"Exercise","fork":false,"url":"https://api.github.com/repos/bialy358/cwiczenie","forks_url":"https://api.github.com/repos/bialy358/cwiczenie/forks","keys_url":"https://api.github.com/repos/bialy358/cwiczenie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bialy358/cwiczenie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bialy358/cwiczenie/teams","hooks_url":"https://api.github.com/repos/bialy358/cwiczenie/hooks","issue_events_url":"https://api.github.com/repos/bialy358/cwiczenie/issues/events{/number}","events_url":"https://api.github.com/repos/bialy358/cwiczenie/events","assignees_url":"https://api.github.com/repos/bialy358/cwiczenie/assignees{/user}","branches_url":"https://api.github.com/repos/bialy358/cwiczenie/branches{/branch}","tags_url":"https://api.github.com/repos/bialy358/cwiczenie/tags","blobs_url":"https://api.github.com/repos/bialy358/cwiczenie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bialy358/cwiczenie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bialy358/cwiczenie/git/refs{/sha}","trees_url":"https://api.github.com/repos/bialy358/cwiczenie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bialy358/cwiczenie/statuses/{sha}","languages_url":"https://api.github.com/repos/bialy358/cwiczenie/languages","stargazers_url":"https://api.github.com/repos/bialy358/cwiczenie/stargazers","contributors_url":"https://api.github.com/repos/bialy358/cwiczenie/contributors","subscribers_url":"https://api.github.com/repos/bialy358/cwiczenie/subscribers","subscription_url":"https://api.github.com/repos/bialy358/cwiczenie/subscription","commits_url":"https://api.github.com/repos/bialy358/cwiczenie/commits{/sha}","git_commits_url":"https://api.github.com/repos/bialy358/cwiczenie/git/commits{/sha}","comments_url":"https://api.github.com/repos/bialy358/cwiczenie/comments{/number}","issue_comment_url":"https://api.github.com/repos/bialy358/cwiczenie/issues/comments{/number}","contents_url":"https://api.github.com/repos/bialy358/cwiczenie/contents/{+path}","compare_url":"https://api.github.com/repos/bialy358/cwiczenie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bialy358/cwiczenie/merges","archive_url":"https://api.github.com/repos/bialy358/cwiczenie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bialy358/cwiczenie/downloads","issues_url":"https://api.github.com/repos/bialy358/cwiczenie/issues{/number}","pulls_url":"https://api.github.com/repos/bialy358/cwiczenie/pulls{/number}","milestones_url":"https://api.github.com/repos/bialy358/cwiczenie/milestones{/number}","notifications_url":"https://api.github.com/repos/bialy358/cwiczenie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bialy358/cwiczenie/labels{/name}","releases_url":"https://api.github.com/repos/bialy358/cwiczenie/releases{/id}","deployments_url":"https://api.github.com/repos/bialy358/cwiczenie/deployments","created_at":"2016-02-09T15:34:24Z","updated_at":"2016-02-09T15:35:55Z","pushed_at":"2016-02-12T10:51:06Z","git_url":"git://github.com/bialy358/cwiczenie.git","ssh_url":"git@github.com:bialy358/cwiczenie.git","clone_url":"https://github.com/bialy358/cwiczenie.git","svn_url":"https://github.com/bialy358/cwiczenie","homepage":null,"size":32,"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":"bialy358:master","ref":"master","sha":"d7b9065f0b08b9fb652931b4a4bb05dbd93b09d2","user":{"login":"bialy358","id":13016007,"avatar_url":"https://avatars.githubusercontent.com/u/13016007?v=3","gravatar_id":"","url":"https://api.github.com/users/bialy358","html_url":"https://github.com/bialy358","followers_url":"https://api.github.com/users/bialy358/followers","following_url":"https://api.github.com/users/bialy358/following{/other_user}","gists_url":"https://api.github.com/users/bialy358/gists{/gist_id}","starred_url":"https://api.github.com/users/bialy358/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bialy358/subscriptions","organizations_url":"https://api.github.com/users/bialy358/orgs","repos_url":"https://api.github.com/users/bialy358/repos","events_url":"https://api.github.com/users/bialy358/events{/privacy}","received_events_url":"https://api.github.com/users/bialy358/received_events","type":"User","site_admin":false},"repo":{"id":51375937,"name":"cwiczenie","full_name":"bialy358/cwiczenie","owner":{"login":"bialy358","id":13016007,"avatar_url":"https://avatars.githubusercontent.com/u/13016007?v=3","gravatar_id":"","url":"https://api.github.com/users/bialy358","html_url":"https://github.com/bialy358","followers_url":"https://api.github.com/users/bialy358/followers","following_url":"https://api.github.com/users/bialy358/following{/other_user}","gists_url":"https://api.github.com/users/bialy358/gists{/gist_id}","starred_url":"https://api.github.com/users/bialy358/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bialy358/subscriptions","organizations_url":"https://api.github.com/users/bialy358/orgs","repos_url":"https://api.github.com/users/bialy358/repos","events_url":"https://api.github.com/users/bialy358/events{/privacy}","received_events_url":"https://api.github.com/users/bialy358/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bialy358/cwiczenie","description":"Exercise","fork":false,"url":"https://api.github.com/repos/bialy358/cwiczenie","forks_url":"https://api.github.com/repos/bialy358/cwiczenie/forks","keys_url":"https://api.github.com/repos/bialy358/cwiczenie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bialy358/cwiczenie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bialy358/cwiczenie/teams","hooks_url":"https://api.github.com/repos/bialy358/cwiczenie/hooks","issue_events_url":"https://api.github.com/repos/bialy358/cwiczenie/issues/events{/number}","events_url":"https://api.github.com/repos/bialy358/cwiczenie/events","assignees_url":"https://api.github.com/repos/bialy358/cwiczenie/assignees{/user}","branches_url":"https://api.github.com/repos/bialy358/cwiczenie/branches{/branch}","tags_url":"https://api.github.com/repos/bialy358/cwiczenie/tags","blobs_url":"https://api.github.com/repos/bialy358/cwiczenie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bialy358/cwiczenie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bialy358/cwiczenie/git/refs{/sha}","trees_url":"https://api.github.com/repos/bialy358/cwiczenie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bialy358/cwiczenie/statuses/{sha}","languages_url":"https://api.github.com/repos/bialy358/cwiczenie/languages","stargazers_url":"https://api.github.com/repos/bialy358/cwiczenie/stargazers","contributors_url":"https://api.github.com/repos/bialy358/cwiczenie/contributors","subscribers_url":"https://api.github.com/repos/bialy358/cwiczenie/subscribers","subscription_url":"https://api.github.com/repos/bialy358/cwiczenie/subscription","commits_url":"https://api.github.com/repos/bialy358/cwiczenie/commits{/sha}","git_commits_url":"https://api.github.com/repos/bialy358/cwiczenie/git/commits{/sha}","comments_url":"https://api.github.com/repos/bialy358/cwiczenie/comments{/number}","issue_comment_url":"https://api.github.com/repos/bialy358/cwiczenie/issues/comments{/number}","contents_url":"https://api.github.com/repos/bialy358/cwiczenie/contents/{+path}","compare_url":"https://api.github.com/repos/bialy358/cwiczenie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bialy358/cwiczenie/merges","archive_url":"https://api.github.com/repos/bialy358/cwiczenie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bialy358/cwiczenie/downloads","issues_url":"https://api.github.com/repos/bialy358/cwiczenie/issues{/number}","pulls_url":"https://api.github.com/repos/bialy358/cwiczenie/pulls{/number}","milestones_url":"https://api.github.com/repos/bialy358/cwiczenie/milestones{/number}","notifications_url":"https://api.github.com/repos/bialy358/cwiczenie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bialy358/cwiczenie/labels{/name}","releases_url":"https://api.github.com/repos/bialy358/cwiczenie/releases{/id}","deployments_url":"https://api.github.com/repos/bialy358/cwiczenie/deployments","created_at":"2016-02-09T15:34:24Z","updated_at":"2016-02-09T15:35:55Z","pushed_at":"2016-02-12T10:51:06Z","git_url":"git://github.com/bialy358/cwiczenie.git","ssh_url":"git@github.com:bialy358/cwiczenie.git","clone_url":"https://github.com/bialy358/cwiczenie.git","svn_url":"https://github.com/bialy358/cwiczenie","homepage":null,"size":32,"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/bialy358/cwiczenie/pulls/1"},"html":{"href":"https://github.com/bialy358/cwiczenie/pull/1"},"issue":{"href":"https://api.github.com/repos/bialy358/cwiczenie/issues/1"},"comments":{"href":"https://api.github.com/repos/bialy358/cwiczenie/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/bialy358/cwiczenie/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/bialy358/cwiczenie/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bialy358/cwiczenie/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/bialy358/cwiczenie/statuses/227e3bda766ee1b4abfbec8a02b53642e7042e4e"}}}}