{"action":"created","comment":{"url":"https://api.github.com/repos/Mraky09/sample_app/pulls/comments/91890004","pull_request_review_id":12398320,"id":91890004,"diff_hunk":"@@ -23,10 +29,45 @@ def create\n     end\n   end\n \n+  def edit\n+    @user = User.find params[:id]\n+  end\n+\n+  def update\n+    @user = User.find params[:id]\n+    if @user.update_attributes user_params\n+    else\n+      render :edit\n+    end\n+  end\n+\n+  def destroy\n+    User.find(params[:id]).destroy","path":"app/controllers/users_controller.rb","position":28,"original_position":28,"commit_id":"c9631deb1b076209e2384053617c7c9f6d28e57a","original_commit_id":"c9631deb1b076209e2384053617c7c9f6d28e57a","user":{"login":"nhunght","id":14239703,"avatar_url":"https://avatars.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":"trường hợp không tìm thấy user thì có destroy được không?","created_at":"2016-12-12T06:46:12Z","updated_at":"2016-12-12T06:46:12Z","html_url":"https://github.com/Mraky09/sample_app/pull/7#discussion_r91890004","pull_request_url":"https://api.github.com/repos/Mraky09/sample_app/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/Mraky09/sample_app/pulls/comments/91890004"},"html":{"href":"https://github.com/Mraky09/sample_app/pull/7#discussion_r91890004"},"pull_request":{"href":"https://api.github.com/repos/Mraky09/sample_app/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/Mraky09/sample_app/pulls/7","id":97501953,"html_url":"https://github.com/Mraky09/sample_app/pull/7","diff_url":"https://github.com/Mraky09/sample_app/pull/7.diff","patch_url":"https://github.com/Mraky09/sample_app/pull/7.patch","issue_url":"https://api.github.com/repos/Mraky09/sample_app/issues/7","number":7,"state":"open","locked":false,"title":"Finish user edit","user":{"login":"Mraky09","id":22260918,"avatar_url":"https://avatars.githubusercontent.com/u/22260918?v=3","gravatar_id":"","url":"https://api.github.com/users/Mraky09","html_url":"https://github.com/Mraky09","followers_url":"https://api.github.com/users/Mraky09/followers","following_url":"https://api.github.com/users/Mraky09/following{/other_user}","gists_url":"https://api.github.com/users/Mraky09/gists{/gist_id}","starred_url":"https://api.github.com/users/Mraky09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mraky09/subscriptions","organizations_url":"https://api.github.com/users/Mraky09/orgs","repos_url":"https://api.github.com/users/Mraky09/repos","events_url":"https://api.github.com/users/Mraky09/events{/privacy}","received_events_url":"https://api.github.com/users/Mraky09/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-12T06:43:19Z","updated_at":"2016-12-12T06:46:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7106b374c6dbfc6d575ee14461c6d904e0893734","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Mraky09/sample_app/pulls/7/commits","review_comments_url":"https://api.github.com/repos/Mraky09/sample_app/pulls/7/comments","review_comment_url":"https://api.github.com/repos/Mraky09/sample_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Mraky09/sample_app/issues/7/comments","statuses_url":"https://api.github.com/repos/Mraky09/sample_app/statuses/c9631deb1b076209e2384053617c7c9f6d28e57a","head":{"label":"Mraky09:updating-users","ref":"updating-users","sha":"c9631deb1b076209e2384053617c7c9f6d28e57a","user":{"login":"Mraky09","id":22260918,"avatar_url":"https://avatars.githubusercontent.com/u/22260918?v=3","gravatar_id":"","url":"https://api.github.com/users/Mraky09","html_url":"https://github.com/Mraky09","followers_url":"https://api.github.com/users/Mraky09/followers","following_url":"https://api.github.com/users/Mraky09/following{/other_user}","gists_url":"https://api.github.com/users/Mraky09/gists{/gist_id}","starred_url":"https://api.github.com/users/Mraky09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mraky09/subscriptions","organizations_url":"https://api.github.com/users/Mraky09/orgs","repos_url":"https://api.github.com/users/Mraky09/repos","events_url":"https://api.github.com/users/Mraky09/events{/privacy}","received_events_url":"https://api.github.com/users/Mraky09/received_events","type":"User","site_admin":false},"repo":{"id":75356449,"name":"sample_app","full_name":"Mraky09/sample_app","owner":{"login":"Mraky09","id":22260918,"avatar_url":"https://avatars.githubusercontent.com/u/22260918?v=3","gravatar_id":"","url":"https://api.github.com/users/Mraky09","html_url":"https://github.com/Mraky09","followers_url":"https://api.github.com/users/Mraky09/followers","following_url":"https://api.github.com/users/Mraky09/following{/other_user}","gists_url":"https://api.github.com/users/Mraky09/gists{/gist_id}","starred_url":"https://api.github.com/users/Mraky09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mraky09/subscriptions","organizations_url":"https://api.github.com/users/Mraky09/orgs","repos_url":"https://api.github.com/users/Mraky09/repos","events_url":"https://api.github.com/users/Mraky09/events{/privacy}","received_events_url":"https://api.github.com/users/Mraky09/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mraky09/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/Mraky09/sample_app","forks_url":"https://api.github.com/repos/Mraky09/sample_app/forks","keys_url":"https://api.github.com/repos/Mraky09/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mraky09/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mraky09/sample_app/teams","hooks_url":"https://api.github.com/repos/Mraky09/sample_app/hooks","issue_events_url":"https://api.github.com/repos/Mraky09/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/Mraky09/sample_app/events","assignees_url":"https://api.github.com/repos/Mraky09/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/Mraky09/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/Mraky09/sample_app/tags","blobs_url":"https://api.github.com/repos/Mraky09/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mraky09/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mraky09/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mraky09/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mraky09/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/Mraky09/sample_app/languages","stargazers_url":"https://api.github.com/repos/Mraky09/sample_app/stargazers","contributors_url":"https://api.github.com/repos/Mraky09/sample_app/contributors","subscribers_url":"https://api.github.com/repos/Mraky09/sample_app/subscribers","subscription_url":"https://api.github.com/repos/Mraky09/sample_app/subscription","commits_url":"https://api.github.com/repos/Mraky09/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mraky09/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mraky09/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mraky09/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mraky09/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/Mraky09/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mraky09/sample_app/merges","archive_url":"https://api.github.com/repos/Mraky09/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mraky09/sample_app/downloads","issues_url":"https://api.github.com/repos/Mraky09/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/Mraky09/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/Mraky09/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/Mraky09/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mraky09/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/Mraky09/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/Mraky09/sample_app/deployments","created_at":"2016-12-02T03:19:49Z","updated_at":"2016-12-02T03:23:22Z","pushed_at":"2016-12-12T06:43:19Z","git_url":"git://github.com/Mraky09/sample_app.git","ssh_url":"git@github.com:Mraky09/sample_app.git","clone_url":"https://github.com/Mraky09/sample_app.git","svn_url":"https://github.com/Mraky09/sample_app","homepage":null,"size":204,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Mraky09:master","ref":"master","sha":"884c0bc4bf2d6211ec4f7dce8f85eb81ba144e20","user":{"login":"Mraky09","id":22260918,"avatar_url":"https://avatars.githubusercontent.com/u/22260918?v=3","gravatar_id":"","url":"https://api.github.com/users/Mraky09","html_url":"https://github.com/Mraky09","followers_url":"https://api.github.com/users/Mraky09/followers","following_url":"https://api.github.com/users/Mraky09/following{/other_user}","gists_url":"https://api.github.com/users/Mraky09/gists{/gist_id}","starred_url":"https://api.github.com/users/Mraky09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mraky09/subscriptions","organizations_url":"https://api.github.com/users/Mraky09/orgs","repos_url":"https://api.github.com/users/Mraky09/repos","events_url":"https://api.github.com/users/Mraky09/events{/privacy}","received_events_url":"https://api.github.com/users/Mraky09/received_events","type":"User","site_admin":false},"repo":{"id":75356449,"name":"sample_app","full_name":"Mraky09/sample_app","owner":{"login":"Mraky09","id":22260918,"avatar_url":"https://avatars.githubusercontent.com/u/22260918?v=3","gravatar_id":"","url":"https://api.github.com/users/Mraky09","html_url":"https://github.com/Mraky09","followers_url":"https://api.github.com/users/Mraky09/followers","following_url":"https://api.github.com/users/Mraky09/following{/other_user}","gists_url":"https://api.github.com/users/Mraky09/gists{/gist_id}","starred_url":"https://api.github.com/users/Mraky09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mraky09/subscriptions","organizations_url":"https://api.github.com/users/Mraky09/orgs","repos_url":"https://api.github.com/users/Mraky09/repos","events_url":"https://api.github.com/users/Mraky09/events{/privacy}","received_events_url":"https://api.github.com/users/Mraky09/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mraky09/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/Mraky09/sample_app","forks_url":"https://api.github.com/repos/Mraky09/sample_app/forks","keys_url":"https://api.github.com/repos/Mraky09/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mraky09/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mraky09/sample_app/teams","hooks_url":"https://api.github.com/repos/Mraky09/sample_app/hooks","issue_events_url":"https://api.github.com/repos/Mraky09/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/Mraky09/sample_app/events","assignees_url":"https://api.github.com/repos/Mraky09/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/Mraky09/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/Mraky09/sample_app/tags","blobs_url":"https://api.github.com/repos/Mraky09/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mraky09/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mraky09/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mraky09/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mraky09/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/Mraky09/sample_app/languages","stargazers_url":"https://api.github.com/repos/Mraky09/sample_app/stargazers","contributors_url":"https://api.github.com/repos/Mraky09/sample_app/contributors","subscribers_url":"https://api.github.com/repos/Mraky09/sample_app/subscribers","subscription_url":"https://api.github.com/repos/Mraky09/sample_app/subscription","commits_url":"https://api.github.com/repos/Mraky09/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mraky09/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mraky09/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mraky09/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mraky09/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/Mraky09/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mraky09/sample_app/merges","archive_url":"https://api.github.com/repos/Mraky09/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mraky09/sample_app/downloads","issues_url":"https://api.github.com/repos/Mraky09/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/Mraky09/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/Mraky09/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/Mraky09/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mraky09/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/Mraky09/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/Mraky09/sample_app/deployments","created_at":"2016-12-02T03:19:49Z","updated_at":"2016-12-02T03:23:22Z","pushed_at":"2016-12-12T06:43:19Z","git_url":"git://github.com/Mraky09/sample_app.git","ssh_url":"git@github.com:Mraky09/sample_app.git","clone_url":"https://github.com/Mraky09/sample_app.git","svn_url":"https://github.com/Mraky09/sample_app","homepage":null,"size":204,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Mraky09/sample_app/pulls/7"},"html":{"href":"https://github.com/Mraky09/sample_app/pull/7"},"issue":{"href":"https://api.github.com/repos/Mraky09/sample_app/issues/7"},"comments":{"href":"https://api.github.com/repos/Mraky09/sample_app/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/Mraky09/sample_app/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/Mraky09/sample_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Mraky09/sample_app/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/Mraky09/sample_app/statuses/c9631deb1b076209e2384053617c7c9f6d28e57a"}}}}
{"actor":{"display_login":"nhunght"}}