{"action":"created","comment":{"url":"https://api.github.com/repos/huyhuynh0296/sample-app/pulls/comments/182927144","pull_request_review_id":113827385,"id":182927144,"diff_hunk":"@@ -0,0 +1,19 @@\n+module SessionsHelper\n+  # Logs in the given user.\n+  def log_in user\n+    session[:user_id] = user.id\n+  end\n+\n+  def current_user\n+    @current_user ||= User.find_by(id: session[:user_id])\n+  end\n+\n+  def logged_in?\n+    !current_user.present?\n+  end\n+\n+  def log_out\n+    session.delete(:user_id)","path":"app/helpers/sessions_helper.rb","position":16,"original_position":16,"commit_id":"d5676a8f268fab1bd142f68b99e7443a5641e576","original_commit_id":"d5676a8f268fab1bd142f68b99e7443a5641e576","user":{"login":"dothidiemthao","id":21377118,"avatar_url":"https://avatars0.githubusercontent.com/u/21377118?v=4","gravatar_id":"","url":"https://api.github.com/users/dothidiemthao","html_url":"https://github.com/dothidiemthao","followers_url":"https://api.github.com/users/dothidiemthao/followers","following_url":"https://api.github.com/users/dothidiemthao/following{/other_user}","gists_url":"https://api.github.com/users/dothidiemthao/gists{/gist_id}","starred_url":"https://api.github.com/users/dothidiemthao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dothidiemthao/subscriptions","organizations_url":"https://api.github.com/users/dothidiemthao/orgs","repos_url":"https://api.github.com/users/dothidiemthao/repos","events_url":"https://api.github.com/users/dothidiemthao/events{/privacy}","received_events_url":"https://api.github.com/users/dothidiemthao/received_events","type":"User","site_admin":false},"body":"bỏ ( )","created_at":"2018-04-20T01:35:27Z","updated_at":"2018-04-20T01:36:43Z","html_url":"https://github.com/huyhuynh0296/sample-app/pull/8#discussion_r182927144","pull_request_url":"https://api.github.com/repos/huyhuynh0296/sample-app/pulls/8","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/huyhuynh0296/sample-app/pulls/comments/182927144"},"html":{"href":"https://github.com/huyhuynh0296/sample-app/pull/8#discussion_r182927144"},"pull_request":{"href":"https://api.github.com/repos/huyhuynh0296/sample-app/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/huyhuynh0296/sample-app/pulls/8","id":182051505,"html_url":"https://github.com/huyhuynh0296/sample-app/pull/8","diff_url":"https://github.com/huyhuynh0296/sample-app/pull/8.diff","patch_url":"https://github.com/huyhuynh0296/sample-app/pull/8.patch","issue_url":"https://api.github.com/repos/huyhuynh0296/sample-app/issues/8","number":8,"state":"open","locked":false,"title":"chapter_8 : Basic login","user":{"login":"huyhuynh0296","id":38024839,"avatar_url":"https://avatars1.githubusercontent.com/u/38024839?v=4","gravatar_id":"","url":"https://api.github.com/users/huyhuynh0296","html_url":"https://github.com/huyhuynh0296","followers_url":"https://api.github.com/users/huyhuynh0296/followers","following_url":"https://api.github.com/users/huyhuynh0296/following{/other_user}","gists_url":"https://api.github.com/users/huyhuynh0296/gists{/gist_id}","starred_url":"https://api.github.com/users/huyhuynh0296/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huyhuynh0296/subscriptions","organizations_url":"https://api.github.com/users/huyhuynh0296/orgs","repos_url":"https://api.github.com/users/huyhuynh0296/repos","events_url":"https://api.github.com/users/huyhuynh0296/events{/privacy}","received_events_url":"https://api.github.com/users/huyhuynh0296/received_events","type":"User","site_admin":false},"body":"![screenshot from 2018-04-17 11-55-58](https://user-images.githubusercontent.com/38024839/38849511-8e42d56a-4236-11e8-821e-bb620d070fea.png)\r\n","created_at":"2018-04-17T04:57:57Z","updated_at":"2018-04-20T01:36:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"60f394745148d80df796f8d39ab7615cea6821f9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/huyhuynh0296/sample-app/pulls/8/commits","review_comments_url":"https://api.github.com/repos/huyhuynh0296/sample-app/pulls/8/comments","review_comment_url":"https://api.github.com/repos/huyhuynh0296/sample-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/huyhuynh0296/sample-app/issues/8/comments","statuses_url":"https://api.github.com/repos/huyhuynh0296/sample-app/statuses/d5676a8f268fab1bd142f68b99e7443a5641e576","head":{"label":"huyhuynh0296:chapter_8","ref":"chapter_8","sha":"d5676a8f268fab1bd142f68b99e7443a5641e576","user":{"login":"huyhuynh0296","id":38024839,"avatar_url":"https://avatars1.githubusercontent.com/u/38024839?v=4","gravatar_id":"","url":"https://api.github.com/users/huyhuynh0296","html_url":"https://github.com/huyhuynh0296","followers_url":"https://api.github.com/users/huyhuynh0296/followers","following_url":"https://api.github.com/users/huyhuynh0296/following{/other_user}","gists_url":"https://api.github.com/users/huyhuynh0296/gists{/gist_id}","starred_url":"https://api.github.com/users/huyhuynh0296/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huyhuynh0296/subscriptions","organizations_url":"https://api.github.com/users/huyhuynh0296/orgs","repos_url":"https://api.github.com/users/huyhuynh0296/repos","events_url":"https://api.github.com/users/huyhuynh0296/events{/privacy}","received_events_url":"https://api.github.com/users/huyhuynh0296/received_events","type":"User","site_admin":false},"repo":{"id":128778229,"name":"sample-app","full_name":"huyhuynh0296/sample-app","owner":{"login":"huyhuynh0296","id":38024839,"avatar_url":"https://avatars1.githubusercontent.com/u/38024839?v=4","gravatar_id":"","url":"https://api.github.com/users/huyhuynh0296","html_url":"https://github.com/huyhuynh0296","followers_url":"https://api.github.com/users/huyhuynh0296/followers","following_url":"https://api.github.com/users/huyhuynh0296/following{/other_user}","gists_url":"https://api.github.com/users/huyhuynh0296/gists{/gist_id}","starred_url":"https://api.github.com/users/huyhuynh0296/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huyhuynh0296/subscriptions","organizations_url":"https://api.github.com/users/huyhuynh0296/orgs","repos_url":"https://api.github.com/users/huyhuynh0296/repos","events_url":"https://api.github.com/users/huyhuynh0296/events{/privacy}","received_events_url":"https://api.github.com/users/huyhuynh0296/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/huyhuynh0296/sample-app","description":null,"fork":false,"url":"https://api.github.com/repos/huyhuynh0296/sample-app","forks_url":"https://api.github.com/repos/huyhuynh0296/sample-app/forks","keys_url":"https://api.github.com/repos/huyhuynh0296/sample-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/huyhuynh0296/sample-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/huyhuynh0296/sample-app/teams","hooks_url":"https://api.github.com/repos/huyhuynh0296/sample-app/hooks","issue_events_url":"https://api.github.com/repos/huyhuynh0296/sample-app/issues/events{/number}","events_url":"https://api.github.com/repos/huyhuynh0296/sample-app/events","assignees_url":"https://api.github.com/repos/huyhuynh0296/sample-app/assignees{/user}","branches_url":"https://api.github.com/repos/huyhuynh0296/sample-app/branches{/branch}","tags_url":"https://api.github.com/repos/huyhuynh0296/sample-app/tags","blobs_url":"https://api.github.com/repos/huyhuynh0296/sample-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/huyhuynh0296/sample-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/huyhuynh0296/sample-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/huyhuynh0296/sample-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/huyhuynh0296/sample-app/statuses/{sha}","languages_url":"https://api.github.com/repos/huyhuynh0296/sample-app/languages","stargazers_url":"https://api.github.com/repos/huyhuynh0296/sample-app/stargazers","contributors_url":"https://api.github.com/repos/huyhuynh0296/sample-app/contributors","subscribers_url":"https://api.github.com/repos/huyhuynh0296/sample-app/subscribers","subscription_url":"https://api.github.com/repos/huyhuynh0296/sample-app/subscription","commits_url":"https://api.github.com/repos/huyhuynh0296/sample-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/huyhuynh0296/sample-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/huyhuynh0296/sample-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/huyhuynh0296/sample-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/huyhuynh0296/sample-app/contents/{+path}","compare_url":"https://api.github.com/repos/huyhuynh0296/sample-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/huyhuynh0296/sample-app/merges","archive_url":"https://api.github.com/repos/huyhuynh0296/sample-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/huyhuynh0296/sample-app/downloads","issues_url":"https://api.github.com/repos/huyhuynh0296/sample-app/issues{/number}","pulls_url":"https://api.github.com/repos/huyhuynh0296/sample-app/pulls{/number}","milestones_url":"https://api.github.com/repos/huyhuynh0296/sample-app/milestones{/number}","notifications_url":"https://api.github.com/repos/huyhuynh0296/sample-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/huyhuynh0296/sample-app/labels{/name}","releases_url":"https://api.github.com/repos/huyhuynh0296/sample-app/releases{/id}","deployments_url":"https://api.github.com/repos/huyhuynh0296/sample-app/deployments","created_at":"2018-04-09T13:41:57Z","updated_at":"2018-04-17T03:19:18Z","pushed_at":"2018-04-19T09:52:51Z","git_url":"git://github.com/huyhuynh0296/sample-app.git","ssh_url":"git@github.com:huyhuynh0296/sample-app.git","clone_url":"https://github.com/huyhuynh0296/sample-app.git","svn_url":"https://github.com/huyhuynh0296/sample-app","homepage":null,"size":129,"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":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"huyhuynh0296:master","ref":"master","sha":"19155dc8b98b36cb2074520682b0722e4ded8d03","user":{"login":"huyhuynh0296","id":38024839,"avatar_url":"https://avatars1.githubusercontent.com/u/38024839?v=4","gravatar_id":"","url":"https://api.github.com/users/huyhuynh0296","html_url":"https://github.com/huyhuynh0296","followers_url":"https://api.github.com/users/huyhuynh0296/followers","following_url":"https://api.github.com/users/huyhuynh0296/following{/other_user}","gists_url":"https://api.github.com/users/huyhuynh0296/gists{/gist_id}","starred_url":"https://api.github.com/users/huyhuynh0296/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huyhuynh0296/subscriptions","organizations_url":"https://api.github.com/users/huyhuynh0296/orgs","repos_url":"https://api.github.com/users/huyhuynh0296/repos","events_url":"https://api.github.com/users/huyhuynh0296/events{/privacy}","received_events_url":"https://api.github.com/users/huyhuynh0296/received_events","type":"User","site_admin":false},"repo":{"id":128778229,"name":"sample-app","full_name":"huyhuynh0296/sample-app","owner":{"login":"huyhuynh0296","id":38024839,"avatar_url":"https://avatars1.githubusercontent.com/u/38024839?v=4","gravatar_id":"","url":"https://api.github.com/users/huyhuynh0296","html_url":"https://github.com/huyhuynh0296","followers_url":"https://api.github.com/users/huyhuynh0296/followers","following_url":"https://api.github.com/users/huyhuynh0296/following{/other_user}","gists_url":"https://api.github.com/users/huyhuynh0296/gists{/gist_id}","starred_url":"https://api.github.com/users/huyhuynh0296/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huyhuynh0296/subscriptions","organizations_url":"https://api.github.com/users/huyhuynh0296/orgs","repos_url":"https://api.github.com/users/huyhuynh0296/repos","events_url":"https://api.github.com/users/huyhuynh0296/events{/privacy}","received_events_url":"https://api.github.com/users/huyhuynh0296/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/huyhuynh0296/sample-app","description":null,"fork":false,"url":"https://api.github.com/repos/huyhuynh0296/sample-app","forks_url":"https://api.github.com/repos/huyhuynh0296/sample-app/forks","keys_url":"https://api.github.com/repos/huyhuynh0296/sample-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/huyhuynh0296/sample-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/huyhuynh0296/sample-app/teams","hooks_url":"https://api.github.com/repos/huyhuynh0296/sample-app/hooks","issue_events_url":"https://api.github.com/repos/huyhuynh0296/sample-app/issues/events{/number}","events_url":"https://api.github.com/repos/huyhuynh0296/sample-app/events","assignees_url":"https://api.github.com/repos/huyhuynh0296/sample-app/assignees{/user}","branches_url":"https://api.github.com/repos/huyhuynh0296/sample-app/branches{/branch}","tags_url":"https://api.github.com/repos/huyhuynh0296/sample-app/tags","blobs_url":"https://api.github.com/repos/huyhuynh0296/sample-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/huyhuynh0296/sample-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/huyhuynh0296/sample-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/huyhuynh0296/sample-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/huyhuynh0296/sample-app/statuses/{sha}","languages_url":"https://api.github.com/repos/huyhuynh0296/sample-app/languages","stargazers_url":"https://api.github.com/repos/huyhuynh0296/sample-app/stargazers","contributors_url":"https://api.github.com/repos/huyhuynh0296/sample-app/contributors","subscribers_url":"https://api.github.com/repos/huyhuynh0296/sample-app/subscribers","subscription_url":"https://api.github.com/repos/huyhuynh0296/sample-app/subscription","commits_url":"https://api.github.com/repos/huyhuynh0296/sample-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/huyhuynh0296/sample-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/huyhuynh0296/sample-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/huyhuynh0296/sample-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/huyhuynh0296/sample-app/contents/{+path}","compare_url":"https://api.github.com/repos/huyhuynh0296/sample-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/huyhuynh0296/sample-app/merges","archive_url":"https://api.github.com/repos/huyhuynh0296/sample-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/huyhuynh0296/sample-app/downloads","issues_url":"https://api.github.com/repos/huyhuynh0296/sample-app/issues{/number}","pulls_url":"https://api.github.com/repos/huyhuynh0296/sample-app/pulls{/number}","milestones_url":"https://api.github.com/repos/huyhuynh0296/sample-app/milestones{/number}","notifications_url":"https://api.github.com/repos/huyhuynh0296/sample-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/huyhuynh0296/sample-app/labels{/name}","releases_url":"https://api.github.com/repos/huyhuynh0296/sample-app/releases{/id}","deployments_url":"https://api.github.com/repos/huyhuynh0296/sample-app/deployments","created_at":"2018-04-09T13:41:57Z","updated_at":"2018-04-17T03:19:18Z","pushed_at":"2018-04-19T09:52:51Z","git_url":"git://github.com/huyhuynh0296/sample-app.git","ssh_url":"git@github.com:huyhuynh0296/sample-app.git","clone_url":"https://github.com/huyhuynh0296/sample-app.git","svn_url":"https://github.com/huyhuynh0296/sample-app","homepage":null,"size":129,"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":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/huyhuynh0296/sample-app/pulls/8"},"html":{"href":"https://github.com/huyhuynh0296/sample-app/pull/8"},"issue":{"href":"https://api.github.com/repos/huyhuynh0296/sample-app/issues/8"},"comments":{"href":"https://api.github.com/repos/huyhuynh0296/sample-app/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/huyhuynh0296/sample-app/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/huyhuynh0296/sample-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/huyhuynh0296/sample-app/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/huyhuynh0296/sample-app/statuses/d5676a8f268fab1bd142f68b99e7443a5641e576"}},"author_association":"OWNER"}}
{"actor":{"display_login":"dothidiemthao"}}