{"action":"created","comment":{"url":"https://api.github.com/repos/manjusakajin/sample_app/pulls/comments/202579624","pull_request_review_id":137306439,"id":202579624,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMjU3OTYyNA==","diff_hunk":"@@ -1,4 +1,13 @@\n class UsersController < ApplicationController\n+  before_action :find_user, only: [:show, :edit, :update]\n+  before_action :logged_in_user, except: [:new, :create]\n+  before_action :correct_user, only: [:edit, :update]\n+\n+  def index\n+    @users = User.select(:id, :name, :email, :admin).order(:name)\n+      .page(params[:page]).per Settings.paginate.per_page","path":"app/controllers/users_controller.rb","position":8,"original_position":8,"commit_id":"bd4ba978c374ac2b3d5fb73fd8c2750c32edd91d","original_commit_id":"bd4ba978c374ac2b3d5fb73fd8c2750c32edd91d","user":{"login":"thangtx88","id":18256324,"node_id":"MDQ6VXNlcjE4MjU2MzI0","avatar_url":"https://avatars1.githubusercontent.com/u/18256324?v=4","gravatar_id":"","url":"https://api.github.com/users/thangtx88","html_url":"https://github.com/thangtx88","followers_url":"https://api.github.com/users/thangtx88/followers","following_url":"https://api.github.com/users/thangtx88/following{/other_user}","gists_url":"https://api.github.com/users/thangtx88/gists{/gist_id}","starred_url":"https://api.github.com/users/thangtx88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thangtx88/subscriptions","organizations_url":"https://api.github.com/users/thangtx88/orgs","repos_url":"https://api.github.com/users/thangtx88/repos","events_url":"https://api.github.com/users/thangtx88/events{/privacy}","received_events_url":"https://api.github.com/users/thangtx88/received_events","type":"User","site_admin":false},"body":"đưa đoạn này thành scope, để dưới model","created_at":"2018-07-16T06:11:39Z","updated_at":"2018-07-16T06:11:39Z","html_url":"https://github.com/manjusakajin/sample_app/pull/8#discussion_r202579624","pull_request_url":"https://api.github.com/repos/manjusakajin/sample_app/pulls/8","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/manjusakajin/sample_app/pulls/comments/202579624"},"html":{"href":"https://github.com/manjusakajin/sample_app/pull/8#discussion_r202579624"},"pull_request":{"href":"https://api.github.com/repos/manjusakajin/sample_app/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/manjusakajin/sample_app/pulls/8","id":200945326,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwOTQ1MzI2","html_url":"https://github.com/manjusakajin/sample_app/pull/8","diff_url":"https://github.com/manjusakajin/sample_app/pull/8.diff","patch_url":"https://github.com/manjusakajin/sample_app/pull/8.patch","issue_url":"https://api.github.com/repos/manjusakajin/sample_app/issues/8","number":8,"state":"open","locked":false,"title":"Chapter 10: Updating, showing, and deleting users","user":{"login":"manjusakajin","id":24894679,"node_id":"MDQ6VXNlcjI0ODk0Njc5","avatar_url":"https://avatars3.githubusercontent.com/u/24894679?v=4","gravatar_id":"","url":"https://api.github.com/users/manjusakajin","html_url":"https://github.com/manjusakajin","followers_url":"https://api.github.com/users/manjusakajin/followers","following_url":"https://api.github.com/users/manjusakajin/following{/other_user}","gists_url":"https://api.github.com/users/manjusakajin/gists{/gist_id}","starred_url":"https://api.github.com/users/manjusakajin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manjusakajin/subscriptions","organizations_url":"https://api.github.com/users/manjusakajin/orgs","repos_url":"https://api.github.com/users/manjusakajin/repos","events_url":"https://api.github.com/users/manjusakajin/events{/privacy}","received_events_url":"https://api.github.com/users/manjusakajin/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-12T09:47:18Z","updated_at":"2018-07-16T06:11:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be6826c1836eb3ec09c0450a421d8a8cefb9cc08","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/manjusakajin/sample_app/pulls/8/commits","review_comments_url":"https://api.github.com/repos/manjusakajin/sample_app/pulls/8/comments","review_comment_url":"https://api.github.com/repos/manjusakajin/sample_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/manjusakajin/sample_app/issues/8/comments","statuses_url":"https://api.github.com/repos/manjusakajin/sample_app/statuses/bd4ba978c374ac2b3d5fb73fd8c2750c32edd91d","head":{"label":"manjusakajin:login","ref":"login","sha":"bd4ba978c374ac2b3d5fb73fd8c2750c32edd91d","user":{"login":"manjusakajin","id":24894679,"node_id":"MDQ6VXNlcjI0ODk0Njc5","avatar_url":"https://avatars3.githubusercontent.com/u/24894679?v=4","gravatar_id":"","url":"https://api.github.com/users/manjusakajin","html_url":"https://github.com/manjusakajin","followers_url":"https://api.github.com/users/manjusakajin/followers","following_url":"https://api.github.com/users/manjusakajin/following{/other_user}","gists_url":"https://api.github.com/users/manjusakajin/gists{/gist_id}","starred_url":"https://api.github.com/users/manjusakajin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manjusakajin/subscriptions","organizations_url":"https://api.github.com/users/manjusakajin/orgs","repos_url":"https://api.github.com/users/manjusakajin/repos","events_url":"https://api.github.com/users/manjusakajin/events{/privacy}","received_events_url":"https://api.github.com/users/manjusakajin/received_events","type":"User","site_admin":false},"repo":{"id":139941518,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk5NDE1MTg=","name":"sample_app","full_name":"manjusakajin/sample_app","owner":{"login":"manjusakajin","id":24894679,"node_id":"MDQ6VXNlcjI0ODk0Njc5","avatar_url":"https://avatars3.githubusercontent.com/u/24894679?v=4","gravatar_id":"","url":"https://api.github.com/users/manjusakajin","html_url":"https://github.com/manjusakajin","followers_url":"https://api.github.com/users/manjusakajin/followers","following_url":"https://api.github.com/users/manjusakajin/following{/other_user}","gists_url":"https://api.github.com/users/manjusakajin/gists{/gist_id}","starred_url":"https://api.github.com/users/manjusakajin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manjusakajin/subscriptions","organizations_url":"https://api.github.com/users/manjusakajin/orgs","repos_url":"https://api.github.com/users/manjusakajin/repos","events_url":"https://api.github.com/users/manjusakajin/events{/privacy}","received_events_url":"https://api.github.com/users/manjusakajin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manjusakajin/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/manjusakajin/sample_app","forks_url":"https://api.github.com/repos/manjusakajin/sample_app/forks","keys_url":"https://api.github.com/repos/manjusakajin/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manjusakajin/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manjusakajin/sample_app/teams","hooks_url":"https://api.github.com/repos/manjusakajin/sample_app/hooks","issue_events_url":"https://api.github.com/repos/manjusakajin/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/manjusakajin/sample_app/events","assignees_url":"https://api.github.com/repos/manjusakajin/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/manjusakajin/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/manjusakajin/sample_app/tags","blobs_url":"https://api.github.com/repos/manjusakajin/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manjusakajin/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manjusakajin/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/manjusakajin/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manjusakajin/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/manjusakajin/sample_app/languages","stargazers_url":"https://api.github.com/repos/manjusakajin/sample_app/stargazers","contributors_url":"https://api.github.com/repos/manjusakajin/sample_app/contributors","subscribers_url":"https://api.github.com/repos/manjusakajin/sample_app/subscribers","subscription_url":"https://api.github.com/repos/manjusakajin/sample_app/subscription","commits_url":"https://api.github.com/repos/manjusakajin/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/manjusakajin/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/manjusakajin/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/manjusakajin/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/manjusakajin/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/manjusakajin/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manjusakajin/sample_app/merges","archive_url":"https://api.github.com/repos/manjusakajin/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manjusakajin/sample_app/downloads","issues_url":"https://api.github.com/repos/manjusakajin/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/manjusakajin/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/manjusakajin/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/manjusakajin/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manjusakajin/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/manjusakajin/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/manjusakajin/sample_app/deployments","created_at":"2018-07-06T06:17:32Z","updated_at":"2018-07-12T03:56:45Z","pushed_at":"2018-07-16T05:37:16Z","git_url":"git://github.com/manjusakajin/sample_app.git","ssh_url":"git@github.com:manjusakajin/sample_app.git","clone_url":"https://github.com/manjusakajin/sample_app.git","svn_url":"https://github.com/manjusakajin/sample_app","homepage":null,"size":223,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"manjusakajin:master","ref":"master","sha":"2d55fc5a3cec8aa5ae04dc7ef1898c1eefd09e8f","user":{"login":"manjusakajin","id":24894679,"node_id":"MDQ6VXNlcjI0ODk0Njc5","avatar_url":"https://avatars3.githubusercontent.com/u/24894679?v=4","gravatar_id":"","url":"https://api.github.com/users/manjusakajin","html_url":"https://github.com/manjusakajin","followers_url":"https://api.github.com/users/manjusakajin/followers","following_url":"https://api.github.com/users/manjusakajin/following{/other_user}","gists_url":"https://api.github.com/users/manjusakajin/gists{/gist_id}","starred_url":"https://api.github.com/users/manjusakajin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manjusakajin/subscriptions","organizations_url":"https://api.github.com/users/manjusakajin/orgs","repos_url":"https://api.github.com/users/manjusakajin/repos","events_url":"https://api.github.com/users/manjusakajin/events{/privacy}","received_events_url":"https://api.github.com/users/manjusakajin/received_events","type":"User","site_admin":false},"repo":{"id":139941518,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk5NDE1MTg=","name":"sample_app","full_name":"manjusakajin/sample_app","owner":{"login":"manjusakajin","id":24894679,"node_id":"MDQ6VXNlcjI0ODk0Njc5","avatar_url":"https://avatars3.githubusercontent.com/u/24894679?v=4","gravatar_id":"","url":"https://api.github.com/users/manjusakajin","html_url":"https://github.com/manjusakajin","followers_url":"https://api.github.com/users/manjusakajin/followers","following_url":"https://api.github.com/users/manjusakajin/following{/other_user}","gists_url":"https://api.github.com/users/manjusakajin/gists{/gist_id}","starred_url":"https://api.github.com/users/manjusakajin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manjusakajin/subscriptions","organizations_url":"https://api.github.com/users/manjusakajin/orgs","repos_url":"https://api.github.com/users/manjusakajin/repos","events_url":"https://api.github.com/users/manjusakajin/events{/privacy}","received_events_url":"https://api.github.com/users/manjusakajin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/manjusakajin/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/manjusakajin/sample_app","forks_url":"https://api.github.com/repos/manjusakajin/sample_app/forks","keys_url":"https://api.github.com/repos/manjusakajin/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manjusakajin/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manjusakajin/sample_app/teams","hooks_url":"https://api.github.com/repos/manjusakajin/sample_app/hooks","issue_events_url":"https://api.github.com/repos/manjusakajin/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/manjusakajin/sample_app/events","assignees_url":"https://api.github.com/repos/manjusakajin/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/manjusakajin/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/manjusakajin/sample_app/tags","blobs_url":"https://api.github.com/repos/manjusakajin/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manjusakajin/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manjusakajin/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/manjusakajin/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manjusakajin/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/manjusakajin/sample_app/languages","stargazers_url":"https://api.github.com/repos/manjusakajin/sample_app/stargazers","contributors_url":"https://api.github.com/repos/manjusakajin/sample_app/contributors","subscribers_url":"https://api.github.com/repos/manjusakajin/sample_app/subscribers","subscription_url":"https://api.github.com/repos/manjusakajin/sample_app/subscription","commits_url":"https://api.github.com/repos/manjusakajin/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/manjusakajin/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/manjusakajin/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/manjusakajin/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/manjusakajin/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/manjusakajin/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manjusakajin/sample_app/merges","archive_url":"https://api.github.com/repos/manjusakajin/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manjusakajin/sample_app/downloads","issues_url":"https://api.github.com/repos/manjusakajin/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/manjusakajin/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/manjusakajin/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/manjusakajin/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manjusakajin/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/manjusakajin/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/manjusakajin/sample_app/deployments","created_at":"2018-07-06T06:17:32Z","updated_at":"2018-07-12T03:56:45Z","pushed_at":"2018-07-16T05:37:16Z","git_url":"git://github.com/manjusakajin/sample_app.git","ssh_url":"git@github.com:manjusakajin/sample_app.git","clone_url":"https://github.com/manjusakajin/sample_app.git","svn_url":"https://github.com/manjusakajin/sample_app","homepage":null,"size":223,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/manjusakajin/sample_app/pulls/8"},"html":{"href":"https://github.com/manjusakajin/sample_app/pull/8"},"issue":{"href":"https://api.github.com/repos/manjusakajin/sample_app/issues/8"},"comments":{"href":"https://api.github.com/repos/manjusakajin/sample_app/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/manjusakajin/sample_app/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/manjusakajin/sample_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/manjusakajin/sample_app/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/manjusakajin/sample_app/statuses/bd4ba978c374ac2b3d5fb73fd8c2750c32edd91d"}},"author_association":"OWNER"}}
{"actor":{"display_login":"thangtx88"}}