{"action":"created","comment":{"url":"https://api.github.com/repos/canvantuan12/sample_app3/pulls/comments/80624576","pull_request_review_id":1669514,"id":80624576,"diff_hunk":"@@ -22,9 +30,42 @@ 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+      flash[:success] = \"Profile updated\"\n+      redirect_to @user\n+    else\n+      render 'edit'\n+    end\n+  end\n+\n+  def logged_in_user\n+    unless logged_in?\n+      store_location\n+      flash[:danger] = \"Please log in.\"\n+      redirect_to login_url\n+    end\n+  end\n+\n+  def correct_user\n+    @user = User.find(params[:id])","path":"app/controllers/users_controller.rb","position":36,"original_position":36,"commit_id":"2a69277bb4c0dfdc186340087300caa637530250","original_commit_id":"2a69277bb4c0dfdc186340087300caa637530250","user":{"login":"thangtx88","id":18256324,"avatar_url":"https://avatars.githubusercontent.com/u/18256324?v=3","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":"bỏ ()","created_at":"2016-09-27T06:01:43Z","updated_at":"2016-09-27T06:01:43Z","html_url":"https://github.com/canvantuan12/sample_app3/pull/3#discussion_r80624576","pull_request_url":"https://api.github.com/repos/canvantuan12/sample_app3/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/canvantuan12/sample_app3/pulls/comments/80624576"},"html":{"href":"https://github.com/canvantuan12/sample_app3/pull/3#discussion_r80624576"},"pull_request":{"href":"https://api.github.com/repos/canvantuan12/sample_app3/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/canvantuan12/sample_app3/pulls/3","id":86866432,"html_url":"https://github.com/canvantuan12/sample_app3/pull/3","diff_url":"https://github.com/canvantuan12/sample_app3/pull/3.diff","patch_url":"https://github.com/canvantuan12/sample_app3/pull/3.patch","issue_url":"https://api.github.com/repos/canvantuan12/sample_app3/issues/3","number":3,"state":"open","locked":false,"title":"Finish user edit, update, index, and destroy actions","user":{"login":"canvantuan12","id":20009630,"avatar_url":"https://avatars.githubusercontent.com/u/20009630?v=3","gravatar_id":"","url":"https://api.github.com/users/canvantuan12","html_url":"https://github.com/canvantuan12","followers_url":"https://api.github.com/users/canvantuan12/followers","following_url":"https://api.github.com/users/canvantuan12/following{/other_user}","gists_url":"https://api.github.com/users/canvantuan12/gists{/gist_id}","starred_url":"https://api.github.com/users/canvantuan12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canvantuan12/subscriptions","organizations_url":"https://api.github.com/users/canvantuan12/orgs","repos_url":"https://api.github.com/users/canvantuan12/repos","events_url":"https://api.github.com/users/canvantuan12/events{/privacy}","received_events_url":"https://api.github.com/users/canvantuan12/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-27T05:58:39Z","updated_at":"2016-09-27T06:01:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f10713539a9461d0c8e277f2c3ce607541cd64bf","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/canvantuan12/sample_app3/pulls/3/commits","review_comments_url":"https://api.github.com/repos/canvantuan12/sample_app3/pulls/3/comments","review_comment_url":"https://api.github.com/repos/canvantuan12/sample_app3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/canvantuan12/sample_app3/issues/3/comments","statuses_url":"https://api.github.com/repos/canvantuan12/sample_app3/statuses/2a69277bb4c0dfdc186340087300caa637530250","head":{"label":"canvantuan12:updating-users","ref":"updating-users","sha":"2a69277bb4c0dfdc186340087300caa637530250","user":{"login":"canvantuan12","id":20009630,"avatar_url":"https://avatars.githubusercontent.com/u/20009630?v=3","gravatar_id":"","url":"https://api.github.com/users/canvantuan12","html_url":"https://github.com/canvantuan12","followers_url":"https://api.github.com/users/canvantuan12/followers","following_url":"https://api.github.com/users/canvantuan12/following{/other_user}","gists_url":"https://api.github.com/users/canvantuan12/gists{/gist_id}","starred_url":"https://api.github.com/users/canvantuan12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canvantuan12/subscriptions","organizations_url":"https://api.github.com/users/canvantuan12/orgs","repos_url":"https://api.github.com/users/canvantuan12/repos","events_url":"https://api.github.com/users/canvantuan12/events{/privacy}","received_events_url":"https://api.github.com/users/canvantuan12/received_events","type":"User","site_admin":false},"repo":{"id":69204814,"name":"sample_app3","full_name":"canvantuan12/sample_app3","owner":{"login":"canvantuan12","id":20009630,"avatar_url":"https://avatars.githubusercontent.com/u/20009630?v=3","gravatar_id":"","url":"https://api.github.com/users/canvantuan12","html_url":"https://github.com/canvantuan12","followers_url":"https://api.github.com/users/canvantuan12/followers","following_url":"https://api.github.com/users/canvantuan12/following{/other_user}","gists_url":"https://api.github.com/users/canvantuan12/gists{/gist_id}","starred_url":"https://api.github.com/users/canvantuan12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canvantuan12/subscriptions","organizations_url":"https://api.github.com/users/canvantuan12/orgs","repos_url":"https://api.github.com/users/canvantuan12/repos","events_url":"https://api.github.com/users/canvantuan12/events{/privacy}","received_events_url":"https://api.github.com/users/canvantuan12/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/canvantuan12/sample_app3","description":null,"fork":false,"url":"https://api.github.com/repos/canvantuan12/sample_app3","forks_url":"https://api.github.com/repos/canvantuan12/sample_app3/forks","keys_url":"https://api.github.com/repos/canvantuan12/sample_app3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/canvantuan12/sample_app3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/canvantuan12/sample_app3/teams","hooks_url":"https://api.github.com/repos/canvantuan12/sample_app3/hooks","issue_events_url":"https://api.github.com/repos/canvantuan12/sample_app3/issues/events{/number}","events_url":"https://api.github.com/repos/canvantuan12/sample_app3/events","assignees_url":"https://api.github.com/repos/canvantuan12/sample_app3/assignees{/user}","branches_url":"https://api.github.com/repos/canvantuan12/sample_app3/branches{/branch}","tags_url":"https://api.github.com/repos/canvantuan12/sample_app3/tags","blobs_url":"https://api.github.com/repos/canvantuan12/sample_app3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/canvantuan12/sample_app3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/canvantuan12/sample_app3/git/refs{/sha}","trees_url":"https://api.github.com/repos/canvantuan12/sample_app3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/canvantuan12/sample_app3/statuses/{sha}","languages_url":"https://api.github.com/repos/canvantuan12/sample_app3/languages","stargazers_url":"https://api.github.com/repos/canvantuan12/sample_app3/stargazers","contributors_url":"https://api.github.com/repos/canvantuan12/sample_app3/contributors","subscribers_url":"https://api.github.com/repos/canvantuan12/sample_app3/subscribers","subscription_url":"https://api.github.com/repos/canvantuan12/sample_app3/subscription","commits_url":"https://api.github.com/repos/canvantuan12/sample_app3/commits{/sha}","git_commits_url":"https://api.github.com/repos/canvantuan12/sample_app3/git/commits{/sha}","comments_url":"https://api.github.com/repos/canvantuan12/sample_app3/comments{/number}","issue_comment_url":"https://api.github.com/repos/canvantuan12/sample_app3/issues/comments{/number}","contents_url":"https://api.github.com/repos/canvantuan12/sample_app3/contents/{+path}","compare_url":"https://api.github.com/repos/canvantuan12/sample_app3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/canvantuan12/sample_app3/merges","archive_url":"https://api.github.com/repos/canvantuan12/sample_app3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/canvantuan12/sample_app3/downloads","issues_url":"https://api.github.com/repos/canvantuan12/sample_app3/issues{/number}","pulls_url":"https://api.github.com/repos/canvantuan12/sample_app3/pulls{/number}","milestones_url":"https://api.github.com/repos/canvantuan12/sample_app3/milestones{/number}","notifications_url":"https://api.github.com/repos/canvantuan12/sample_app3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/canvantuan12/sample_app3/labels{/name}","releases_url":"https://api.github.com/repos/canvantuan12/sample_app3/releases{/id}","deployments_url":"https://api.github.com/repos/canvantuan12/sample_app3/deployments","created_at":"2016-09-26T02:16:38Z","updated_at":"2016-09-26T02:17:14Z","pushed_at":"2016-09-27T05:58:39Z","git_url":"git://github.com/canvantuan12/sample_app3.git","ssh_url":"git@github.com:canvantuan12/sample_app3.git","clone_url":"https://github.com/canvantuan12/sample_app3.git","svn_url":"https://github.com/canvantuan12/sample_app3","homepage":null,"size":77,"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":"canvantuan12:master","ref":"master","sha":"18fbeaa8eedc08eeba003164c875c375c737bdee","user":{"login":"canvantuan12","id":20009630,"avatar_url":"https://avatars.githubusercontent.com/u/20009630?v=3","gravatar_id":"","url":"https://api.github.com/users/canvantuan12","html_url":"https://github.com/canvantuan12","followers_url":"https://api.github.com/users/canvantuan12/followers","following_url":"https://api.github.com/users/canvantuan12/following{/other_user}","gists_url":"https://api.github.com/users/canvantuan12/gists{/gist_id}","starred_url":"https://api.github.com/users/canvantuan12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canvantuan12/subscriptions","organizations_url":"https://api.github.com/users/canvantuan12/orgs","repos_url":"https://api.github.com/users/canvantuan12/repos","events_url":"https://api.github.com/users/canvantuan12/events{/privacy}","received_events_url":"https://api.github.com/users/canvantuan12/received_events","type":"User","site_admin":false},"repo":{"id":69204814,"name":"sample_app3","full_name":"canvantuan12/sample_app3","owner":{"login":"canvantuan12","id":20009630,"avatar_url":"https://avatars.githubusercontent.com/u/20009630?v=3","gravatar_id":"","url":"https://api.github.com/users/canvantuan12","html_url":"https://github.com/canvantuan12","followers_url":"https://api.github.com/users/canvantuan12/followers","following_url":"https://api.github.com/users/canvantuan12/following{/other_user}","gists_url":"https://api.github.com/users/canvantuan12/gists{/gist_id}","starred_url":"https://api.github.com/users/canvantuan12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/canvantuan12/subscriptions","organizations_url":"https://api.github.com/users/canvantuan12/orgs","repos_url":"https://api.github.com/users/canvantuan12/repos","events_url":"https://api.github.com/users/canvantuan12/events{/privacy}","received_events_url":"https://api.github.com/users/canvantuan12/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/canvantuan12/sample_app3","description":null,"fork":false,"url":"https://api.github.com/repos/canvantuan12/sample_app3","forks_url":"https://api.github.com/repos/canvantuan12/sample_app3/forks","keys_url":"https://api.github.com/repos/canvantuan12/sample_app3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/canvantuan12/sample_app3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/canvantuan12/sample_app3/teams","hooks_url":"https://api.github.com/repos/canvantuan12/sample_app3/hooks","issue_events_url":"https://api.github.com/repos/canvantuan12/sample_app3/issues/events{/number}","events_url":"https://api.github.com/repos/canvantuan12/sample_app3/events","assignees_url":"https://api.github.com/repos/canvantuan12/sample_app3/assignees{/user}","branches_url":"https://api.github.com/repos/canvantuan12/sample_app3/branches{/branch}","tags_url":"https://api.github.com/repos/canvantuan12/sample_app3/tags","blobs_url":"https://api.github.com/repos/canvantuan12/sample_app3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/canvantuan12/sample_app3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/canvantuan12/sample_app3/git/refs{/sha}","trees_url":"https://api.github.com/repos/canvantuan12/sample_app3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/canvantuan12/sample_app3/statuses/{sha}","languages_url":"https://api.github.com/repos/canvantuan12/sample_app3/languages","stargazers_url":"https://api.github.com/repos/canvantuan12/sample_app3/stargazers","contributors_url":"https://api.github.com/repos/canvantuan12/sample_app3/contributors","subscribers_url":"https://api.github.com/repos/canvantuan12/sample_app3/subscribers","subscription_url":"https://api.github.com/repos/canvantuan12/sample_app3/subscription","commits_url":"https://api.github.com/repos/canvantuan12/sample_app3/commits{/sha}","git_commits_url":"https://api.github.com/repos/canvantuan12/sample_app3/git/commits{/sha}","comments_url":"https://api.github.com/repos/canvantuan12/sample_app3/comments{/number}","issue_comment_url":"https://api.github.com/repos/canvantuan12/sample_app3/issues/comments{/number}","contents_url":"https://api.github.com/repos/canvantuan12/sample_app3/contents/{+path}","compare_url":"https://api.github.com/repos/canvantuan12/sample_app3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/canvantuan12/sample_app3/merges","archive_url":"https://api.github.com/repos/canvantuan12/sample_app3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/canvantuan12/sample_app3/downloads","issues_url":"https://api.github.com/repos/canvantuan12/sample_app3/issues{/number}","pulls_url":"https://api.github.com/repos/canvantuan12/sample_app3/pulls{/number}","milestones_url":"https://api.github.com/repos/canvantuan12/sample_app3/milestones{/number}","notifications_url":"https://api.github.com/repos/canvantuan12/sample_app3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/canvantuan12/sample_app3/labels{/name}","releases_url":"https://api.github.com/repos/canvantuan12/sample_app3/releases{/id}","deployments_url":"https://api.github.com/repos/canvantuan12/sample_app3/deployments","created_at":"2016-09-26T02:16:38Z","updated_at":"2016-09-26T02:17:14Z","pushed_at":"2016-09-27T05:58:39Z","git_url":"git://github.com/canvantuan12/sample_app3.git","ssh_url":"git@github.com:canvantuan12/sample_app3.git","clone_url":"https://github.com/canvantuan12/sample_app3.git","svn_url":"https://github.com/canvantuan12/sample_app3","homepage":null,"size":77,"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/canvantuan12/sample_app3/pulls/3"},"html":{"href":"https://github.com/canvantuan12/sample_app3/pull/3"},"issue":{"href":"https://api.github.com/repos/canvantuan12/sample_app3/issues/3"},"comments":{"href":"https://api.github.com/repos/canvantuan12/sample_app3/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/canvantuan12/sample_app3/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/canvantuan12/sample_app3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/canvantuan12/sample_app3/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/canvantuan12/sample_app3/statuses/2a69277bb4c0dfdc186340087300caa637530250"}}}}
{"actor":{"display_login":"thangtx88"}}