{"action":"created","comment":{"url":"https://api.github.com/repos/dodat1905/project/pulls/comments/167392446","pull_request_review_id":95616089,"id":167392446,"diff_hunk":"@@ -0,0 +1,20 @@\n+<%= form_for user do |f| %>","path":"app/views/users/_form.html.erb","position":1,"original_position":1,"commit_id":"bdf301f483949f26fd93cebfd08fb22f0da3ed8b","original_commit_id":"55fc19aeb2a93c2e75c13cf064544ee5a554a054","user":{"login":"dodat1905","id":22794404,"avatar_url":"https://avatars1.githubusercontent.com/u/22794404?v=4","gravatar_id":"","url":"https://api.github.com/users/dodat1905","html_url":"https://github.com/dodat1905","followers_url":"https://api.github.com/users/dodat1905/followers","following_url":"https://api.github.com/users/dodat1905/following{/other_user}","gists_url":"https://api.github.com/users/dodat1905/gists{/gist_id}","starred_url":"https://api.github.com/users/dodat1905/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dodat1905/subscriptions","organizations_url":"https://api.github.com/users/dodat1905/orgs","repos_url":"https://api.github.com/users/dodat1905/repos","events_url":"https://api.github.com/users/dodat1905/events{/privacy}","received_events_url":"https://api.github.com/users/dodat1905/received_events","type":"User","site_admin":false},"body":"có gì khác là khi đăng kí user mới thì form sẽ sử dụng post request để tạo người dùng mới. còn khi sửa thì rails sẽ sử dụng patch request để edit user đó ạ\r\nĐể có thể cho biết tạo một user mới hay user đã tồn tại để edit là nhận biết trong cơ sở dữ liệu thông qua Active Record sử dụng new_record? method\r\n![image](https://user-images.githubusercontent.com/22794404/36060037-6ec34d60-0e73-11e8-872e-48fbadba206c.png)\r\nKhi xây dựng một form sử dụng form_for (@user), Rails sử dụng POST nếu @ user.new_record? là đúng và PATCH nếu nó là sai.\r\n","created_at":"2018-02-10T08:02:56Z","updated_at":"2018-02-10T08:02:56Z","html_url":"https://github.com/dodat1905/project/pull/12#discussion_r167392446","pull_request_url":"https://api.github.com/repos/dodat1905/project/pulls/12","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/dodat1905/project/pulls/comments/167392446"},"html":{"href":"https://github.com/dodat1905/project/pull/12#discussion_r167392446"},"pull_request":{"href":"https://api.github.com/repos/dodat1905/project/pulls/12"}},"in_reply_to_id":167164356},"pull_request":{"url":"https://api.github.com/repos/dodat1905/project/pulls/12","id":167480467,"html_url":"https://github.com/dodat1905/project/pull/12","diff_url":"https://github.com/dodat1905/project/pull/12.diff","patch_url":"https://github.com/dodat1905/project/pull/12.patch","issue_url":"https://api.github.com/repos/dodat1905/project/issues/12","number":12,"state":"open","locked":false,"title":"chap 10","user":{"login":"dodat1905","id":22794404,"avatar_url":"https://avatars1.githubusercontent.com/u/22794404?v=4","gravatar_id":"","url":"https://api.github.com/users/dodat1905","html_url":"https://github.com/dodat1905","followers_url":"https://api.github.com/users/dodat1905/followers","following_url":"https://api.github.com/users/dodat1905/following{/other_user}","gists_url":"https://api.github.com/users/dodat1905/gists{/gist_id}","starred_url":"https://api.github.com/users/dodat1905/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dodat1905/subscriptions","organizations_url":"https://api.github.com/users/dodat1905/orgs","repos_url":"https://api.github.com/users/dodat1905/repos","events_url":"https://api.github.com/users/dodat1905/events{/privacy}","received_events_url":"https://api.github.com/users/dodat1905/received_events","type":"User","site_admin":false},"body":"Self review done \r\n![image](https://user-images.githubusercontent.com/22794404/36011045-452d1acc-0d87-11e8-85ec-bad470e9c573.png)\r\n","created_at":"2018-02-06T17:32:04Z","updated_at":"2018-02-10T08:02:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d4d06176a5aedd0c9df20862c1c9dec2252321fd","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dodat1905/project/pulls/12/commits","review_comments_url":"https://api.github.com/repos/dodat1905/project/pulls/12/comments","review_comment_url":"https://api.github.com/repos/dodat1905/project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dodat1905/project/issues/12/comments","statuses_url":"https://api.github.com/repos/dodat1905/project/statuses/bdf301f483949f26fd93cebfd08fb22f0da3ed8b","head":{"label":"dodat1905:chap10","ref":"chap10","sha":"bdf301f483949f26fd93cebfd08fb22f0da3ed8b","user":{"login":"dodat1905","id":22794404,"avatar_url":"https://avatars1.githubusercontent.com/u/22794404?v=4","gravatar_id":"","url":"https://api.github.com/users/dodat1905","html_url":"https://github.com/dodat1905","followers_url":"https://api.github.com/users/dodat1905/followers","following_url":"https://api.github.com/users/dodat1905/following{/other_user}","gists_url":"https://api.github.com/users/dodat1905/gists{/gist_id}","starred_url":"https://api.github.com/users/dodat1905/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dodat1905/subscriptions","organizations_url":"https://api.github.com/users/dodat1905/orgs","repos_url":"https://api.github.com/users/dodat1905/repos","events_url":"https://api.github.com/users/dodat1905/events{/privacy}","received_events_url":"https://api.github.com/users/dodat1905/received_events","type":"User","site_admin":false},"repo":{"id":118574875,"name":"project","full_name":"dodat1905/project","owner":{"login":"dodat1905","id":22794404,"avatar_url":"https://avatars1.githubusercontent.com/u/22794404?v=4","gravatar_id":"","url":"https://api.github.com/users/dodat1905","html_url":"https://github.com/dodat1905","followers_url":"https://api.github.com/users/dodat1905/followers","following_url":"https://api.github.com/users/dodat1905/following{/other_user}","gists_url":"https://api.github.com/users/dodat1905/gists{/gist_id}","starred_url":"https://api.github.com/users/dodat1905/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dodat1905/subscriptions","organizations_url":"https://api.github.com/users/dodat1905/orgs","repos_url":"https://api.github.com/users/dodat1905/repos","events_url":"https://api.github.com/users/dodat1905/events{/privacy}","received_events_url":"https://api.github.com/users/dodat1905/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dodat1905/project","description":null,"fork":false,"url":"https://api.github.com/repos/dodat1905/project","forks_url":"https://api.github.com/repos/dodat1905/project/forks","keys_url":"https://api.github.com/repos/dodat1905/project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dodat1905/project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dodat1905/project/teams","hooks_url":"https://api.github.com/repos/dodat1905/project/hooks","issue_events_url":"https://api.github.com/repos/dodat1905/project/issues/events{/number}","events_url":"https://api.github.com/repos/dodat1905/project/events","assignees_url":"https://api.github.com/repos/dodat1905/project/assignees{/user}","branches_url":"https://api.github.com/repos/dodat1905/project/branches{/branch}","tags_url":"https://api.github.com/repos/dodat1905/project/tags","blobs_url":"https://api.github.com/repos/dodat1905/project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dodat1905/project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dodat1905/project/git/refs{/sha}","trees_url":"https://api.github.com/repos/dodat1905/project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dodat1905/project/statuses/{sha}","languages_url":"https://api.github.com/repos/dodat1905/project/languages","stargazers_url":"https://api.github.com/repos/dodat1905/project/stargazers","contributors_url":"https://api.github.com/repos/dodat1905/project/contributors","subscribers_url":"https://api.github.com/repos/dodat1905/project/subscribers","subscription_url":"https://api.github.com/repos/dodat1905/project/subscription","commits_url":"https://api.github.com/repos/dodat1905/project/commits{/sha}","git_commits_url":"https://api.github.com/repos/dodat1905/project/git/commits{/sha}","comments_url":"https://api.github.com/repos/dodat1905/project/comments{/number}","issue_comment_url":"https://api.github.com/repos/dodat1905/project/issues/comments{/number}","contents_url":"https://api.github.com/repos/dodat1905/project/contents/{+path}","compare_url":"https://api.github.com/repos/dodat1905/project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dodat1905/project/merges","archive_url":"https://api.github.com/repos/dodat1905/project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dodat1905/project/downloads","issues_url":"https://api.github.com/repos/dodat1905/project/issues{/number}","pulls_url":"https://api.github.com/repos/dodat1905/project/pulls{/number}","milestones_url":"https://api.github.com/repos/dodat1905/project/milestones{/number}","notifications_url":"https://api.github.com/repos/dodat1905/project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dodat1905/project/labels{/name}","releases_url":"https://api.github.com/repos/dodat1905/project/releases{/id}","deployments_url":"https://api.github.com/repos/dodat1905/project/deployments","created_at":"2018-01-23T07:34:42Z","updated_at":"2018-01-24T03:43:46Z","pushed_at":"2018-02-10T07:16:25Z","git_url":"git://github.com/dodat1905/project.git","ssh_url":"git@github.com:dodat1905/project.git","clone_url":"https://github.com/dodat1905/project.git","svn_url":"https://github.com/dodat1905/project","homepage":null,"size":111,"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":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"dodat1905:master","ref":"master","sha":"3fc2b547e11d801fe48b43ea7725c49c80002179","user":{"login":"dodat1905","id":22794404,"avatar_url":"https://avatars1.githubusercontent.com/u/22794404?v=4","gravatar_id":"","url":"https://api.github.com/users/dodat1905","html_url":"https://github.com/dodat1905","followers_url":"https://api.github.com/users/dodat1905/followers","following_url":"https://api.github.com/users/dodat1905/following{/other_user}","gists_url":"https://api.github.com/users/dodat1905/gists{/gist_id}","starred_url":"https://api.github.com/users/dodat1905/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dodat1905/subscriptions","organizations_url":"https://api.github.com/users/dodat1905/orgs","repos_url":"https://api.github.com/users/dodat1905/repos","events_url":"https://api.github.com/users/dodat1905/events{/privacy}","received_events_url":"https://api.github.com/users/dodat1905/received_events","type":"User","site_admin":false},"repo":{"id":118574875,"name":"project","full_name":"dodat1905/project","owner":{"login":"dodat1905","id":22794404,"avatar_url":"https://avatars1.githubusercontent.com/u/22794404?v=4","gravatar_id":"","url":"https://api.github.com/users/dodat1905","html_url":"https://github.com/dodat1905","followers_url":"https://api.github.com/users/dodat1905/followers","following_url":"https://api.github.com/users/dodat1905/following{/other_user}","gists_url":"https://api.github.com/users/dodat1905/gists{/gist_id}","starred_url":"https://api.github.com/users/dodat1905/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dodat1905/subscriptions","organizations_url":"https://api.github.com/users/dodat1905/orgs","repos_url":"https://api.github.com/users/dodat1905/repos","events_url":"https://api.github.com/users/dodat1905/events{/privacy}","received_events_url":"https://api.github.com/users/dodat1905/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dodat1905/project","description":null,"fork":false,"url":"https://api.github.com/repos/dodat1905/project","forks_url":"https://api.github.com/repos/dodat1905/project/forks","keys_url":"https://api.github.com/repos/dodat1905/project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dodat1905/project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dodat1905/project/teams","hooks_url":"https://api.github.com/repos/dodat1905/project/hooks","issue_events_url":"https://api.github.com/repos/dodat1905/project/issues/events{/number}","events_url":"https://api.github.com/repos/dodat1905/project/events","assignees_url":"https://api.github.com/repos/dodat1905/project/assignees{/user}","branches_url":"https://api.github.com/repos/dodat1905/project/branches{/branch}","tags_url":"https://api.github.com/repos/dodat1905/project/tags","blobs_url":"https://api.github.com/repos/dodat1905/project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dodat1905/project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dodat1905/project/git/refs{/sha}","trees_url":"https://api.github.com/repos/dodat1905/project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dodat1905/project/statuses/{sha}","languages_url":"https://api.github.com/repos/dodat1905/project/languages","stargazers_url":"https://api.github.com/repos/dodat1905/project/stargazers","contributors_url":"https://api.github.com/repos/dodat1905/project/contributors","subscribers_url":"https://api.github.com/repos/dodat1905/project/subscribers","subscription_url":"https://api.github.com/repos/dodat1905/project/subscription","commits_url":"https://api.github.com/repos/dodat1905/project/commits{/sha}","git_commits_url":"https://api.github.com/repos/dodat1905/project/git/commits{/sha}","comments_url":"https://api.github.com/repos/dodat1905/project/comments{/number}","issue_comment_url":"https://api.github.com/repos/dodat1905/project/issues/comments{/number}","contents_url":"https://api.github.com/repos/dodat1905/project/contents/{+path}","compare_url":"https://api.github.com/repos/dodat1905/project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dodat1905/project/merges","archive_url":"https://api.github.com/repos/dodat1905/project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dodat1905/project/downloads","issues_url":"https://api.github.com/repos/dodat1905/project/issues{/number}","pulls_url":"https://api.github.com/repos/dodat1905/project/pulls{/number}","milestones_url":"https://api.github.com/repos/dodat1905/project/milestones{/number}","notifications_url":"https://api.github.com/repos/dodat1905/project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dodat1905/project/labels{/name}","releases_url":"https://api.github.com/repos/dodat1905/project/releases{/id}","deployments_url":"https://api.github.com/repos/dodat1905/project/deployments","created_at":"2018-01-23T07:34:42Z","updated_at":"2018-01-24T03:43:46Z","pushed_at":"2018-02-10T07:16:25Z","git_url":"git://github.com/dodat1905/project.git","ssh_url":"git@github.com:dodat1905/project.git","clone_url":"https://github.com/dodat1905/project.git","svn_url":"https://github.com/dodat1905/project","homepage":null,"size":111,"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":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dodat1905/project/pulls/12"},"html":{"href":"https://github.com/dodat1905/project/pull/12"},"issue":{"href":"https://api.github.com/repos/dodat1905/project/issues/12"},"comments":{"href":"https://api.github.com/repos/dodat1905/project/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/dodat1905/project/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/dodat1905/project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dodat1905/project/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/dodat1905/project/statuses/bdf301f483949f26fd93cebfd08fb22f0da3ed8b"}},"author_association":"OWNER"}}
{"actor":{"display_login":"dodat1905"}}