{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/edu-tratu/pulls/comments/108059660","pull_request_review_id":29069073,"id":108059660,"diff_hunk":"@@ -0,0 +1,40 @@\n+class Admin::UsersController < ApplicationController\n+  load_and_authorize_resource\n+  before_action :authenticate_user!, :verify_admin\n+  before_action :load_user, only: :destroy\n+  layout \"admin\"\n+\n+  def index\n+    @users = User.select(:id, :name, :email, :created_at, :role).page(params[:page])\n+      .per Settings.organizations.per_page\n+  end\n+\n+  def show\n+  end\n+\n+  def destroy\n+    @organizations = Organization.search_organization params[:id]\n+    if delete_user_and_organization\n+      flash[:success] = t \".delete_success\"\n+    else\n+      flash[:danger] = t \".delete_error\"\n+    end\n+    redirect_to admin_users_url\n+  end\n+\n+  private\n+\n+  def load_user\n+    @user = User.find_by id: params[:id] || NullUser.new\n+    not_found unless @user","path":"app/controllers/admin/users_controller.rb","position":29,"original_position":29,"commit_id":"4724ad67fa5a785e41edb5bb2230d889aa4b1a51","original_commit_id":"4724ad67fa5a785e41edb5bb2230d889aa4b1a51","user":{"login":"nhunght","id":14239703,"avatar_url":"https://avatars3.githubusercontent.com/u/14239703?v=3","gravatar_id":"","url":"https://api.github.com/users/nhunght","html_url":"https://github.com/nhunght","followers_url":"https://api.github.com/users/nhunght/followers","following_url":"https://api.github.com/users/nhunght/following{/other_user}","gists_url":"https://api.github.com/users/nhunght/gists{/gist_id}","starred_url":"https://api.github.com/users/nhunght/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhunght/subscriptions","organizations_url":"https://api.github.com/users/nhunght/orgs","repos_url":"https://api.github.com/users/nhunght/repos","events_url":"https://api.github.com/users/nhunght/events{/privacy}","received_events_url":"https://api.github.com/users/nhunght/received_events","type":"User","site_admin":false},"body":"để không phải làm nào cũng phải kiểm tra có @user thì em nên settings trong application_controllers\r\n\r\n","created_at":"2017-03-26T12:41:59Z","updated_at":"2017-03-26T12:41:59Z","html_url":"https://github.com/framgia/edu-tratu/pull/30#discussion_r108059660","pull_request_url":"https://api.github.com/repos/framgia/edu-tratu/pulls/30","_links":{"self":{"href":"https://api.github.com/repos/framgia/edu-tratu/pulls/comments/108059660"},"html":{"href":"https://github.com/framgia/edu-tratu/pull/30#discussion_r108059660"},"pull_request":{"href":"https://api.github.com/repos/framgia/edu-tratu/pulls/30"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/edu-tratu/pulls/30","id":111199080,"html_url":"https://github.com/framgia/edu-tratu/pull/30","diff_url":"https://github.com/framgia/edu-tratu/pull/30.diff","patch_url":"https://github.com/framgia/edu-tratu/pull/30.patch","issue_url":"https://api.github.com/repos/framgia/edu-tratu/issues/30","number":30,"state":"open","locked":false,"title":"All users and Delete and Search users","user":{"login":"thonglhuet","id":25763557,"avatar_url":"https://avatars2.githubusercontent.com/u/25763557?v=3","gravatar_id":"","url":"https://api.github.com/users/thonglhuet","html_url":"https://github.com/thonglhuet","followers_url":"https://api.github.com/users/thonglhuet/followers","following_url":"https://api.github.com/users/thonglhuet/following{/other_user}","gists_url":"https://api.github.com/users/thonglhuet/gists{/gist_id}","starred_url":"https://api.github.com/users/thonglhuet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thonglhuet/subscriptions","organizations_url":"https://api.github.com/users/thonglhuet/orgs","repos_url":"https://api.github.com/users/thonglhuet/repos","events_url":"https://api.github.com/users/thonglhuet/events{/privacy}","received_events_url":"https://api.github.com/users/thonglhuet/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-03-17T01:43:15Z","updated_at":"2017-03-26T12:41:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ad7f0a51be7edd731a10f0c2f5ddf04d52af8d0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/edu-tratu/pulls/30/commits","review_comments_url":"https://api.github.com/repos/framgia/edu-tratu/pulls/30/comments","review_comment_url":"https://api.github.com/repos/framgia/edu-tratu/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/edu-tratu/issues/30/comments","statuses_url":"https://api.github.com/repos/framgia/edu-tratu/statuses/4724ad67fa5a785e41edb5bb2230d889aa4b1a51","head":{"label":"thonglhuet:admin-user","ref":"admin-user","sha":"4724ad67fa5a785e41edb5bb2230d889aa4b1a51","user":{"login":"thonglhuet","id":25763557,"avatar_url":"https://avatars2.githubusercontent.com/u/25763557?v=3","gravatar_id":"","url":"https://api.github.com/users/thonglhuet","html_url":"https://github.com/thonglhuet","followers_url":"https://api.github.com/users/thonglhuet/followers","following_url":"https://api.github.com/users/thonglhuet/following{/other_user}","gists_url":"https://api.github.com/users/thonglhuet/gists{/gist_id}","starred_url":"https://api.github.com/users/thonglhuet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thonglhuet/subscriptions","organizations_url":"https://api.github.com/users/thonglhuet/orgs","repos_url":"https://api.github.com/users/thonglhuet/repos","events_url":"https://api.github.com/users/thonglhuet/events{/privacy}","received_events_url":"https://api.github.com/users/thonglhuet/received_events","type":"User","site_admin":false},"repo":{"id":84981363,"name":"edu-tratu","full_name":"thonglhuet/edu-tratu","owner":{"login":"thonglhuet","id":25763557,"avatar_url":"https://avatars2.githubusercontent.com/u/25763557?v=3","gravatar_id":"","url":"https://api.github.com/users/thonglhuet","html_url":"https://github.com/thonglhuet","followers_url":"https://api.github.com/users/thonglhuet/followers","following_url":"https://api.github.com/users/thonglhuet/following{/other_user}","gists_url":"https://api.github.com/users/thonglhuet/gists{/gist_id}","starred_url":"https://api.github.com/users/thonglhuet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thonglhuet/subscriptions","organizations_url":"https://api.github.com/users/thonglhuet/orgs","repos_url":"https://api.github.com/users/thonglhuet/repos","events_url":"https://api.github.com/users/thonglhuet/events{/privacy}","received_events_url":"https://api.github.com/users/thonglhuet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thonglhuet/edu-tratu","description":"Find, build dictionary or words","fork":true,"url":"https://api.github.com/repos/thonglhuet/edu-tratu","forks_url":"https://api.github.com/repos/thonglhuet/edu-tratu/forks","keys_url":"https://api.github.com/repos/thonglhuet/edu-tratu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thonglhuet/edu-tratu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thonglhuet/edu-tratu/teams","hooks_url":"https://api.github.com/repos/thonglhuet/edu-tratu/hooks","issue_events_url":"https://api.github.com/repos/thonglhuet/edu-tratu/issues/events{/number}","events_url":"https://api.github.com/repos/thonglhuet/edu-tratu/events","assignees_url":"https://api.github.com/repos/thonglhuet/edu-tratu/assignees{/user}","branches_url":"https://api.github.com/repos/thonglhuet/edu-tratu/branches{/branch}","tags_url":"https://api.github.com/repos/thonglhuet/edu-tratu/tags","blobs_url":"https://api.github.com/repos/thonglhuet/edu-tratu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thonglhuet/edu-tratu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thonglhuet/edu-tratu/git/refs{/sha}","trees_url":"https://api.github.com/repos/thonglhuet/edu-tratu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thonglhuet/edu-tratu/statuses/{sha}","languages_url":"https://api.github.com/repos/thonglhuet/edu-tratu/languages","stargazers_url":"https://api.github.com/repos/thonglhuet/edu-tratu/stargazers","contributors_url":"https://api.github.com/repos/thonglhuet/edu-tratu/contributors","subscribers_url":"https://api.github.com/repos/thonglhuet/edu-tratu/subscribers","subscription_url":"https://api.github.com/repos/thonglhuet/edu-tratu/subscription","commits_url":"https://api.github.com/repos/thonglhuet/edu-tratu/commits{/sha}","git_commits_url":"https://api.github.com/repos/thonglhuet/edu-tratu/git/commits{/sha}","comments_url":"https://api.github.com/repos/thonglhuet/edu-tratu/comments{/number}","issue_comment_url":"https://api.github.com/repos/thonglhuet/edu-tratu/issues/comments{/number}","contents_url":"https://api.github.com/repos/thonglhuet/edu-tratu/contents/{+path}","compare_url":"https://api.github.com/repos/thonglhuet/edu-tratu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thonglhuet/edu-tratu/merges","archive_url":"https://api.github.com/repos/thonglhuet/edu-tratu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thonglhuet/edu-tratu/downloads","issues_url":"https://api.github.com/repos/thonglhuet/edu-tratu/issues{/number}","pulls_url":"https://api.github.com/repos/thonglhuet/edu-tratu/pulls{/number}","milestones_url":"https://api.github.com/repos/thonglhuet/edu-tratu/milestones{/number}","notifications_url":"https://api.github.com/repos/thonglhuet/edu-tratu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thonglhuet/edu-tratu/labels{/name}","releases_url":"https://api.github.com/repos/thonglhuet/edu-tratu/releases{/id}","deployments_url":"https://api.github.com/repos/thonglhuet/edu-tratu/deployments","created_at":"2017-03-14T18:02:26Z","updated_at":"2017-02-28T09:29:34Z","pushed_at":"2017-03-26T10:48:09Z","git_url":"git://github.com/thonglhuet/edu-tratu.git","ssh_url":"git@github.com:thonglhuet/edu-tratu.git","clone_url":"https://github.com/thonglhuet/edu-tratu.git","svn_url":"https://github.com/thonglhuet/edu-tratu","homepage":null,"size":235,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"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":"framgia:develop","ref":"develop","sha":"b2d6911311b0bffc0672e434d72714b1e7a21adf","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars0.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":83414326,"name":"edu-tratu","full_name":"framgia/edu-tratu","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars0.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/edu-tratu","description":"Find, build dictionary or words","fork":false,"url":"https://api.github.com/repos/framgia/edu-tratu","forks_url":"https://api.github.com/repos/framgia/edu-tratu/forks","keys_url":"https://api.github.com/repos/framgia/edu-tratu/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/edu-tratu/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/edu-tratu/teams","hooks_url":"https://api.github.com/repos/framgia/edu-tratu/hooks","issue_events_url":"https://api.github.com/repos/framgia/edu-tratu/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/edu-tratu/events","assignees_url":"https://api.github.com/repos/framgia/edu-tratu/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/edu-tratu/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/edu-tratu/tags","blobs_url":"https://api.github.com/repos/framgia/edu-tratu/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/edu-tratu/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/edu-tratu/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/edu-tratu/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/edu-tratu/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/edu-tratu/languages","stargazers_url":"https://api.github.com/repos/framgia/edu-tratu/stargazers","contributors_url":"https://api.github.com/repos/framgia/edu-tratu/contributors","subscribers_url":"https://api.github.com/repos/framgia/edu-tratu/subscribers","subscription_url":"https://api.github.com/repos/framgia/edu-tratu/subscription","commits_url":"https://api.github.com/repos/framgia/edu-tratu/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/edu-tratu/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/edu-tratu/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/edu-tratu/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/edu-tratu/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/edu-tratu/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/edu-tratu/merges","archive_url":"https://api.github.com/repos/framgia/edu-tratu/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/edu-tratu/downloads","issues_url":"https://api.github.com/repos/framgia/edu-tratu/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/edu-tratu/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/edu-tratu/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/edu-tratu/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/edu-tratu/labels{/name}","releases_url":"https://api.github.com/repos/framgia/edu-tratu/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/edu-tratu/deployments","created_at":"2017-02-28T09:29:34Z","updated_at":"2017-02-28T09:29:34Z","pushed_at":"2017-03-26T10:48:10Z","git_url":"git://github.com/framgia/edu-tratu.git","ssh_url":"git@github.com:framgia/edu-tratu.git","clone_url":"https://github.com/framgia/edu-tratu.git","svn_url":"https://github.com/framgia/edu-tratu","homepage":null,"size":235,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":7,"forks":4,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/edu-tratu/pulls/30"},"html":{"href":"https://github.com/framgia/edu-tratu/pull/30"},"issue":{"href":"https://api.github.com/repos/framgia/edu-tratu/issues/30"},"comments":{"href":"https://api.github.com/repos/framgia/edu-tratu/issues/30/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/edu-tratu/pulls/30/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/edu-tratu/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/edu-tratu/pulls/30/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/edu-tratu/statuses/4724ad67fa5a785e41edb5bb2230d889aa4b1a51"}}}}
{"actor":{"display_login":"nhunght"}}