{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/pulls/comments/206416059","pull_request_review_id":141824846,"id":206416059,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjQxNjA1OQ==","diff_hunk":"@@ -0,0 +1,32 @@\n+class Admin::UsersController < ApplicationController\n+  layout \"index\", only: :destroy\n+  before_action :logged_in_user, only: :destroy\n+  before_action :find_by, only: [:correct_user, :destroy]\n+  before_action :admin_user, only: :destroy\n+\n+  def destroy\n+    if @user.destroy\n+      flash[:success] = t \".deleted\"\n+    else\n+      flash[:warning] = t \".delete_fail\"\n+    end\n+    redirect_to admin_showuser_path\n+  end\n+\n+  private\n+\n+  def correct_user\n+    redirect_to root_url unless current_user? @user\n+  end\n+\n+  def admin_user\n+    redirect_to root_url unless current_user.admin?\n+  end\n+\n+  def find_by\n+    @user = User.find_by id: params[:id]\n+    return if @user","path":"app/controllers/admin/users_controller.rb","position":28,"original_position":28,"commit_id":"4cbad6f6af54de5a4febe48d19d2ccaba02b8e3d","original_commit_id":"4cbad6f6af54de5a4febe48d19d2ccaba02b8e3d","user":{"login":"thanhhungchu95","id":8967163,"node_id":"MDQ6VXNlcjg5NjcxNjM=","avatar_url":"https://avatars2.githubusercontent.com/u/8967163?v=4","gravatar_id":"","url":"https://api.github.com/users/thanhhungchu95","html_url":"https://github.com/thanhhungchu95","followers_url":"https://api.github.com/users/thanhhungchu95/followers","following_url":"https://api.github.com/users/thanhhungchu95/following{/other_user}","gists_url":"https://api.github.com/users/thanhhungchu95/gists{/gist_id}","starred_url":"https://api.github.com/users/thanhhungchu95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thanhhungchu95/subscriptions","organizations_url":"https://api.github.com/users/thanhhungchu95/orgs","repos_url":"https://api.github.com/users/thanhhungchu95/repos","events_url":"https://api.github.com/users/thanhhungchu95/events{/privacy}","received_events_url":"https://api.github.com/users/thanhhungchu95/received_events","type":"User","site_admin":false},"body":"Thêm dòng trống phía trên","created_at":"2018-07-31T07:11:52Z","updated_at":"2018-07-31T07:28:49Z","html_url":"https://github.com/framgia/rails_timeline_event_management_01/pull/27#discussion_r206416059","pull_request_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/pulls/27","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/pulls/comments/206416059"},"html":{"href":"https://github.com/framgia/rails_timeline_event_management_01/pull/27#discussion_r206416059"},"pull_request":{"href":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/pulls/27","id":205007788,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1MDA3Nzg4","html_url":"https://github.com/framgia/rails_timeline_event_management_01/pull/27","diff_url":"https://github.com/framgia/rails_timeline_event_management_01/pull/27.diff","patch_url":"https://github.com/framgia/rails_timeline_event_management_01/pull/27.patch","issue_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/issues/27","number":27,"state":"open","locked":false,"title":"admin","user":{"login":"hoangvietthai","id":22155224,"node_id":"MDQ6VXNlcjIyMTU1MjI0","avatar_url":"https://avatars1.githubusercontent.com/u/22155224?v=4","gravatar_id":"","url":"https://api.github.com/users/hoangvietthai","html_url":"https://github.com/hoangvietthai","followers_url":"https://api.github.com/users/hoangvietthai/followers","following_url":"https://api.github.com/users/hoangvietthai/following{/other_user}","gists_url":"https://api.github.com/users/hoangvietthai/gists{/gist_id}","starred_url":"https://api.github.com/users/hoangvietthai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoangvietthai/subscriptions","organizations_url":"https://api.github.com/users/hoangvietthai/orgs","repos_url":"https://api.github.com/users/hoangvietthai/repos","events_url":"https://api.github.com/users/hoangvietthai/events{/privacy}","received_events_url":"https://api.github.com/users/hoangvietthai/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-31T06:26:12Z","updated_at":"2018-07-31T07:28:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7c7be344e6aa6d52895a9a3c69b723bb8f7e26fe","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/pulls/27/commits","review_comments_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/pulls/27/comments","review_comment_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/issues/27/comments","statuses_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/statuses/4cbad6f6af54de5a4febe48d19d2ccaba02b8e3d","head":{"label":"hoangvietthai:admin","ref":"admin","sha":"4cbad6f6af54de5a4febe48d19d2ccaba02b8e3d","user":{"login":"hoangvietthai","id":22155224,"node_id":"MDQ6VXNlcjIyMTU1MjI0","avatar_url":"https://avatars1.githubusercontent.com/u/22155224?v=4","gravatar_id":"","url":"https://api.github.com/users/hoangvietthai","html_url":"https://github.com/hoangvietthai","followers_url":"https://api.github.com/users/hoangvietthai/followers","following_url":"https://api.github.com/users/hoangvietthai/following{/other_user}","gists_url":"https://api.github.com/users/hoangvietthai/gists{/gist_id}","starred_url":"https://api.github.com/users/hoangvietthai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoangvietthai/subscriptions","organizations_url":"https://api.github.com/users/hoangvietthai/orgs","repos_url":"https://api.github.com/users/hoangvietthai/repos","events_url":"https://api.github.com/users/hoangvietthai/events{/privacy}","received_events_url":"https://api.github.com/users/hoangvietthai/received_events","type":"User","site_admin":false},"repo":{"id":141954827,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE5NTQ4Mjc=","name":"rails_timeline_event_management_01","full_name":"hoangvietthai/rails_timeline_event_management_01","owner":{"login":"hoangvietthai","id":22155224,"node_id":"MDQ6VXNlcjIyMTU1MjI0","avatar_url":"https://avatars1.githubusercontent.com/u/22155224?v=4","gravatar_id":"","url":"https://api.github.com/users/hoangvietthai","html_url":"https://github.com/hoangvietthai","followers_url":"https://api.github.com/users/hoangvietthai/followers","following_url":"https://api.github.com/users/hoangvietthai/following{/other_user}","gists_url":"https://api.github.com/users/hoangvietthai/gists{/gist_id}","starred_url":"https://api.github.com/users/hoangvietthai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hoangvietthai/subscriptions","organizations_url":"https://api.github.com/users/hoangvietthai/orgs","repos_url":"https://api.github.com/users/hoangvietthai/repos","events_url":"https://api.github.com/users/hoangvietthai/events{/privacy}","received_events_url":"https://api.github.com/users/hoangvietthai/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hoangvietthai/rails_timeline_event_management_01","description":null,"fork":true,"url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01","forks_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/forks","keys_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/teams","hooks_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/hooks","issue_events_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/issues/events{/number}","events_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/events","assignees_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/assignees{/user}","branches_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/branches{/branch}","tags_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/tags","blobs_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/git/refs{/sha}","trees_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/statuses/{sha}","languages_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/languages","stargazers_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/stargazers","contributors_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/contributors","subscribers_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/subscribers","subscription_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/subscription","commits_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/commits{/sha}","git_commits_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/git/commits{/sha}","comments_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/comments{/number}","issue_comment_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/issues/comments{/number}","contents_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/contents/{+path}","compare_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/merges","archive_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/downloads","issues_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/issues{/number}","pulls_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/pulls{/number}","milestones_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/milestones{/number}","notifications_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/labels{/name}","releases_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/releases{/id}","deployments_url":"https://api.github.com/repos/hoangvietthai/rails_timeline_event_management_01/deployments","created_at":"2018-07-23T03:11:06Z","updated_at":"2018-07-23T03:11:07Z","pushed_at":"2018-07-31T07:02:33Z","git_url":"git://github.com/hoangvietthai/rails_timeline_event_management_01.git","ssh_url":"git@github.com:hoangvietthai/rails_timeline_event_management_01.git","clone_url":"https://github.com/hoangvietthai/rails_timeline_event_management_01.git","svn_url":"https://github.com/hoangvietthai/rails_timeline_event_management_01","homepage":null,"size":5049,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"f5ed843e936c94b6a454b6585048f109e701d2ec","user":{"login":"framgia","id":2322183,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjIxODM=","avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","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":141824049,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE4MjQwNDk=","name":"rails_timeline_event_management_01","full_name":"framgia/rails_timeline_event_management_01","owner":{"login":"framgia","id":2322183,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMjIxODM=","avatar_url":"https://avatars3.githubusercontent.com/u/2322183?v=4","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/rails_timeline_event_management_01","description":null,"fork":false,"url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01","forks_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/forks","keys_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/teams","hooks_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/hooks","issue_events_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/events","assignees_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/tags","blobs_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/languages","stargazers_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/stargazers","contributors_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/contributors","subscribers_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/subscribers","subscription_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/subscription","commits_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/merges","archive_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/downloads","issues_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/labels{/name}","releases_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/releases{/id}","deployments_url":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/deployments","created_at":"2018-07-21T15:20:37Z","updated_at":"2018-07-21T15:20:40Z","pushed_at":"2018-07-31T07:02:34Z","git_url":"git://github.com/framgia/rails_timeline_event_management_01.git","ssh_url":"git@github.com:framgia/rails_timeline_event_management_01.git","clone_url":"https://github.com/framgia/rails_timeline_event_management_01.git","svn_url":"https://github.com/framgia/rails_timeline_event_management_01","homepage":null,"size":5052,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":3,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/pulls/27"},"html":{"href":"https://github.com/framgia/rails_timeline_event_management_01/pull/27"},"issue":{"href":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/issues/27"},"comments":{"href":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/rails_timeline_event_management_01/statuses/4cbad6f6af54de5a4febe48d19d2ccaba02b8e3d"}},"author_association":"NONE"}}
{"actor":{"display_login":"thanhhungchu95"}}