{"action":"created","comment":{"url":"https://api.github.com/repos/thucpt20/sample_app/pulls/comments/331405706","pull_request_review_id":297342964,"id":331405706,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzMTQwNTcwNg==","diff_hunk":"@@ -7,7 +7,10 @@ class User < ApplicationRecord\n   validates :email, presence: true, length: {maximum: Settings.size.email},\n     format: {with: FORMAT_EMAIL}, uniqueness: {case_sensitive: false}\n   has_secure_password\n-  validates :password, presence: true, length: {minimum: Settings.size.password}\n+  validates :password, presence: true,\n+    length: {minimum: Settings.size.password}, allow_nil: true\n+\n+  scope :remove, -> id {where(\"id != ?\", id)}","path":"app/models/user.rb","position":8,"original_position":8,"commit_id":"58fa2fea37f19d93a7b885d175d56f4607c4ed9a","original_commit_id":"58fa2fea37f19d93a7b885d175d56f4607c4ed9a","user":{"login":"vanvtt-0952","id":49464465,"node_id":"MDQ6VXNlcjQ5NDY0NDY1","avatar_url":"https://avatars2.githubusercontent.com/u/49464465?v=4","gravatar_id":"","url":"https://api.github.com/users/vanvtt-0952","html_url":"https://github.com/vanvtt-0952","followers_url":"https://api.github.com/users/vanvtt-0952/followers","following_url":"https://api.github.com/users/vanvtt-0952/following{/other_user}","gists_url":"https://api.github.com/users/vanvtt-0952/gists{/gist_id}","starred_url":"https://api.github.com/users/vanvtt-0952/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vanvtt-0952/subscriptions","organizations_url":"https://api.github.com/users/vanvtt-0952/orgs","repos_url":"https://api.github.com/users/vanvtt-0952/repos","events_url":"https://api.github.com/users/vanvtt-0952/events{/privacy}","received_events_url":"https://api.github.com/users/vanvtt-0952/received_events","type":"User","site_admin":false},"body":"scope này em dùng với mục đích chi?\r\n\r\nnên load hết toàn bộ user ở page index chứ\r\n\r\nnếu em sợ nó xóa chính nó thì em nên xử lý 2 step sau:\r\nTại view: check xem id của current_user và usser giống nhau thì ko hiển thị button destroy \r\ntại controller: để phòng trường hợp nó cố tình phá thì em check xem id dc xóa và current user có giống ko, giống thì ko cho xóa, warning thôi\r\n\r\nnếu em ko load user đó ở index thì sao nó thay dổi profile của nó dc đúng hơm :p ","created_at":"2019-10-04T09:02:29Z","updated_at":"2019-10-04T09:03:18Z","html_url":"https://github.com/thucpt20/sample_app/pull/8#discussion_r331405706","pull_request_url":"https://api.github.com/repos/thucpt20/sample_app/pulls/8","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/thucpt20/sample_app/pulls/comments/331405706"},"html":{"href":"https://github.com/thucpt20/sample_app/pull/8#discussion_r331405706"},"pull_request":{"href":"https://api.github.com/repos/thucpt20/sample_app/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/thucpt20/sample_app/pulls/8","id":324130432,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI0MTMwNDMy","html_url":"https://github.com/thucpt20/sample_app/pull/8","diff_url":"https://github.com/thucpt20/sample_app/pull/8.diff","patch_url":"https://github.com/thucpt20/sample_app/pull/8.patch","issue_url":"https://api.github.com/repos/thucpt20/sample_app/issues/8","number":8,"state":"open","locked":false,"title":"show, update, delete users","user":{"login":"thucpt20","id":45997165,"node_id":"MDQ6VXNlcjQ1OTk3MTY1","avatar_url":"https://avatars0.githubusercontent.com/u/45997165?v=4","gravatar_id":"","url":"https://api.github.com/users/thucpt20","html_url":"https://github.com/thucpt20","followers_url":"https://api.github.com/users/thucpt20/followers","following_url":"https://api.github.com/users/thucpt20/following{/other_user}","gists_url":"https://api.github.com/users/thucpt20/gists{/gist_id}","starred_url":"https://api.github.com/users/thucpt20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thucpt20/subscriptions","organizations_url":"https://api.github.com/users/thucpt20/orgs","repos_url":"https://api.github.com/users/thucpt20/repos","events_url":"https://api.github.com/users/thucpt20/events{/privacy}","received_events_url":"https://api.github.com/users/thucpt20/received_events","type":"User","site_admin":false},"body":"![Screenshot from 2019-10-03 16-40-21](https://user-images.githubusercontent.com/45997165/66116239-9375c900-e5fc-11e9-8b72-54200724ca85.png)\r\n","created_at":"2019-10-03T09:42:30Z","updated_at":"2019-10-04T09:03:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"34197f4afc68241db4cb8ee1a2c62a15454dd807","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/thucpt20/sample_app/pulls/8/commits","review_comments_url":"https://api.github.com/repos/thucpt20/sample_app/pulls/8/comments","review_comment_url":"https://api.github.com/repos/thucpt20/sample_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thucpt20/sample_app/issues/8/comments","statuses_url":"https://api.github.com/repos/thucpt20/sample_app/statuses/58fa2fea37f19d93a7b885d175d56f4607c4ed9a","head":{"label":"thucpt20:chapter_10","ref":"chapter_10","sha":"58fa2fea37f19d93a7b885d175d56f4607c4ed9a","user":{"login":"thucpt20","id":45997165,"node_id":"MDQ6VXNlcjQ1OTk3MTY1","avatar_url":"https://avatars0.githubusercontent.com/u/45997165?v=4","gravatar_id":"","url":"https://api.github.com/users/thucpt20","html_url":"https://github.com/thucpt20","followers_url":"https://api.github.com/users/thucpt20/followers","following_url":"https://api.github.com/users/thucpt20/following{/other_user}","gists_url":"https://api.github.com/users/thucpt20/gists{/gist_id}","starred_url":"https://api.github.com/users/thucpt20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thucpt20/subscriptions","organizations_url":"https://api.github.com/users/thucpt20/orgs","repos_url":"https://api.github.com/users/thucpt20/repos","events_url":"https://api.github.com/users/thucpt20/events{/privacy}","received_events_url":"https://api.github.com/users/thucpt20/received_events","type":"User","site_admin":false},"repo":{"id":210989892,"node_id":"MDEwOlJlcG9zaXRvcnkyMTA5ODk4OTI=","name":"sample_app","full_name":"thucpt20/sample_app","private":false,"owner":{"login":"thucpt20","id":45997165,"node_id":"MDQ6VXNlcjQ1OTk3MTY1","avatar_url":"https://avatars0.githubusercontent.com/u/45997165?v=4","gravatar_id":"","url":"https://api.github.com/users/thucpt20","html_url":"https://github.com/thucpt20","followers_url":"https://api.github.com/users/thucpt20/followers","following_url":"https://api.github.com/users/thucpt20/following{/other_user}","gists_url":"https://api.github.com/users/thucpt20/gists{/gist_id}","starred_url":"https://api.github.com/users/thucpt20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thucpt20/subscriptions","organizations_url":"https://api.github.com/users/thucpt20/orgs","repos_url":"https://api.github.com/users/thucpt20/repos","events_url":"https://api.github.com/users/thucpt20/events{/privacy}","received_events_url":"https://api.github.com/users/thucpt20/received_events","type":"User","site_admin":false},"html_url":"https://github.com/thucpt20/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/thucpt20/sample_app","forks_url":"https://api.github.com/repos/thucpt20/sample_app/forks","keys_url":"https://api.github.com/repos/thucpt20/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thucpt20/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thucpt20/sample_app/teams","hooks_url":"https://api.github.com/repos/thucpt20/sample_app/hooks","issue_events_url":"https://api.github.com/repos/thucpt20/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/thucpt20/sample_app/events","assignees_url":"https://api.github.com/repos/thucpt20/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/thucpt20/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/thucpt20/sample_app/tags","blobs_url":"https://api.github.com/repos/thucpt20/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thucpt20/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thucpt20/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/thucpt20/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thucpt20/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/thucpt20/sample_app/languages","stargazers_url":"https://api.github.com/repos/thucpt20/sample_app/stargazers","contributors_url":"https://api.github.com/repos/thucpt20/sample_app/contributors","subscribers_url":"https://api.github.com/repos/thucpt20/sample_app/subscribers","subscription_url":"https://api.github.com/repos/thucpt20/sample_app/subscription","commits_url":"https://api.github.com/repos/thucpt20/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/thucpt20/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/thucpt20/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/thucpt20/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/thucpt20/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/thucpt20/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thucpt20/sample_app/merges","archive_url":"https://api.github.com/repos/thucpt20/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thucpt20/sample_app/downloads","issues_url":"https://api.github.com/repos/thucpt20/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/thucpt20/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/thucpt20/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/thucpt20/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thucpt20/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/thucpt20/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/thucpt20/sample_app/deployments","created_at":"2019-09-26T03:17:01Z","updated_at":"2019-10-03T01:36:46Z","pushed_at":"2019-10-04T08:49:03Z","git_url":"git://github.com/thucpt20/sample_app.git","ssh_url":"git@github.com:thucpt20/sample_app.git","clone_url":"https://github.com/thucpt20/sample_app.git","svn_url":"https://github.com/thucpt20/sample_app","homepage":null,"size":45,"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,"disabled":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"thucpt20:master","ref":"master","sha":"b0dccbcb885930b03ad60d8dbd164a41600206c3","user":{"login":"thucpt20","id":45997165,"node_id":"MDQ6VXNlcjQ1OTk3MTY1","avatar_url":"https://avatars0.githubusercontent.com/u/45997165?v=4","gravatar_id":"","url":"https://api.github.com/users/thucpt20","html_url":"https://github.com/thucpt20","followers_url":"https://api.github.com/users/thucpt20/followers","following_url":"https://api.github.com/users/thucpt20/following{/other_user}","gists_url":"https://api.github.com/users/thucpt20/gists{/gist_id}","starred_url":"https://api.github.com/users/thucpt20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thucpt20/subscriptions","organizations_url":"https://api.github.com/users/thucpt20/orgs","repos_url":"https://api.github.com/users/thucpt20/repos","events_url":"https://api.github.com/users/thucpt20/events{/privacy}","received_events_url":"https://api.github.com/users/thucpt20/received_events","type":"User","site_admin":false},"repo":{"id":210989892,"node_id":"MDEwOlJlcG9zaXRvcnkyMTA5ODk4OTI=","name":"sample_app","full_name":"thucpt20/sample_app","private":false,"owner":{"login":"thucpt20","id":45997165,"node_id":"MDQ6VXNlcjQ1OTk3MTY1","avatar_url":"https://avatars0.githubusercontent.com/u/45997165?v=4","gravatar_id":"","url":"https://api.github.com/users/thucpt20","html_url":"https://github.com/thucpt20","followers_url":"https://api.github.com/users/thucpt20/followers","following_url":"https://api.github.com/users/thucpt20/following{/other_user}","gists_url":"https://api.github.com/users/thucpt20/gists{/gist_id}","starred_url":"https://api.github.com/users/thucpt20/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thucpt20/subscriptions","organizations_url":"https://api.github.com/users/thucpt20/orgs","repos_url":"https://api.github.com/users/thucpt20/repos","events_url":"https://api.github.com/users/thucpt20/events{/privacy}","received_events_url":"https://api.github.com/users/thucpt20/received_events","type":"User","site_admin":false},"html_url":"https://github.com/thucpt20/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/thucpt20/sample_app","forks_url":"https://api.github.com/repos/thucpt20/sample_app/forks","keys_url":"https://api.github.com/repos/thucpt20/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thucpt20/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thucpt20/sample_app/teams","hooks_url":"https://api.github.com/repos/thucpt20/sample_app/hooks","issue_events_url":"https://api.github.com/repos/thucpt20/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/thucpt20/sample_app/events","assignees_url":"https://api.github.com/repos/thucpt20/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/thucpt20/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/thucpt20/sample_app/tags","blobs_url":"https://api.github.com/repos/thucpt20/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thucpt20/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thucpt20/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/thucpt20/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thucpt20/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/thucpt20/sample_app/languages","stargazers_url":"https://api.github.com/repos/thucpt20/sample_app/stargazers","contributors_url":"https://api.github.com/repos/thucpt20/sample_app/contributors","subscribers_url":"https://api.github.com/repos/thucpt20/sample_app/subscribers","subscription_url":"https://api.github.com/repos/thucpt20/sample_app/subscription","commits_url":"https://api.github.com/repos/thucpt20/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/thucpt20/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/thucpt20/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/thucpt20/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/thucpt20/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/thucpt20/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thucpt20/sample_app/merges","archive_url":"https://api.github.com/repos/thucpt20/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thucpt20/sample_app/downloads","issues_url":"https://api.github.com/repos/thucpt20/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/thucpt20/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/thucpt20/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/thucpt20/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thucpt20/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/thucpt20/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/thucpt20/sample_app/deployments","created_at":"2019-09-26T03:17:01Z","updated_at":"2019-10-03T01:36:46Z","pushed_at":"2019-10-04T08:49:03Z","git_url":"git://github.com/thucpt20/sample_app.git","ssh_url":"git@github.com:thucpt20/sample_app.git","clone_url":"https://github.com/thucpt20/sample_app.git","svn_url":"https://github.com/thucpt20/sample_app","homepage":null,"size":45,"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,"disabled":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/thucpt20/sample_app/pulls/8"},"html":{"href":"https://github.com/thucpt20/sample_app/pull/8"},"issue":{"href":"https://api.github.com/repos/thucpt20/sample_app/issues/8"},"comments":{"href":"https://api.github.com/repos/thucpt20/sample_app/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/thucpt20/sample_app/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/thucpt20/sample_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thucpt20/sample_app/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/thucpt20/sample_app/statuses/58fa2fea37f19d93a7b885d175d56f4607c4ed9a"}},"author_association":"OWNER"}}
{"actor":{"display_login":"vanvtt-0952"}}