{"action":"created","comment":{"url":"https://api.github.com/repos/ninhle9984/Tutorial/pulls/comments/169853318","pull_request_review_id":98446513,"id":169853318,"diff_hunk":"@@ -0,0 +1,18 @@\n+module SessionsHelper\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]","path":"app/helpers/sessions_helper.rb","position":7,"original_position":7,"commit_id":"e9a087c048dedbe09e6e556ac6c08ef769ad4a79","original_commit_id":"88f5e63338fc0ede06d379b11b190efde4ac08a0","user":{"login":"ninhle9984","id":31109513,"avatar_url":"https://avatars3.githubusercontent.com/u/31109513?v=4","gravatar_id":"","url":"https://api.github.com/users/ninhle9984","html_url":"https://github.com/ninhle9984","followers_url":"https://api.github.com/users/ninhle9984/followers","following_url":"https://api.github.com/users/ninhle9984/following{/other_user}","gists_url":"https://api.github.com/users/ninhle9984/gists{/gist_id}","starred_url":"https://api.github.com/users/ninhle9984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninhle9984/subscriptions","organizations_url":"https://api.github.com/users/ninhle9984/orgs","repos_url":"https://api.github.com/users/ninhle9984/repos","events_url":"https://api.github.com/users/ninhle9984/events{/privacy}","received_events_url":"https://api.github.com/users/ninhle9984/received_events","type":"User","site_admin":false},"body":"Hiểu đơn giản thì nó  là toán tử dùng để gán giá trị:\r\n a ||= b\r\nNếu giá trị của a là nil thì câu lênh trên sẽ gán giá trị cho a = b, nếu giá trị của a khác nil thì gía trị của a được giữ nguyên","created_at":"2018-02-22T04:40:08Z","updated_at":"2018-02-22T04:40:08Z","html_url":"https://github.com/ninhle9984/Tutorial/pull/9#discussion_r169853318","pull_request_url":"https://api.github.com/repos/ninhle9984/Tutorial/pulls/9","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/ninhle9984/Tutorial/pulls/comments/169853318"},"html":{"href":"https://github.com/ninhle9984/Tutorial/pull/9#discussion_r169853318"},"pull_request":{"href":"https://api.github.com/repos/ninhle9984/Tutorial/pulls/9"}},"in_reply_to_id":169852269},"pull_request":{"url":"https://api.github.com/repos/ninhle9984/Tutorial/pulls/9","id":170645918,"html_url":"https://github.com/ninhle9984/Tutorial/pull/9","diff_url":"https://github.com/ninhle9984/Tutorial/pull/9.diff","patch_url":"https://github.com/ninhle9984/Tutorial/pull/9.patch","issue_url":"https://api.github.com/repos/ninhle9984/Tutorial/issues/9","number":9,"state":"open","locked":false,"title":"Chap 8","user":{"login":"ninhle9984","id":31109513,"avatar_url":"https://avatars3.githubusercontent.com/u/31109513?v=4","gravatar_id":"","url":"https://api.github.com/users/ninhle9984","html_url":"https://github.com/ninhle9984","followers_url":"https://api.github.com/users/ninhle9984/followers","following_url":"https://api.github.com/users/ninhle9984/following{/other_user}","gists_url":"https://api.github.com/users/ninhle9984/gists{/gist_id}","starred_url":"https://api.github.com/users/ninhle9984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninhle9984/subscriptions","organizations_url":"https://api.github.com/users/ninhle9984/orgs","repos_url":"https://api.github.com/users/ninhle9984/repos","events_url":"https://api.github.com/users/ninhle9984/events{/privacy}","received_events_url":"https://api.github.com/users/ninhle9984/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-22T03:02:51Z","updated_at":"2018-02-22T04:40:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"adc596003d6bf9e6da5f3504c23e4f062c185494","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ninhle9984/Tutorial/pulls/9/commits","review_comments_url":"https://api.github.com/repos/ninhle9984/Tutorial/pulls/9/comments","review_comment_url":"https://api.github.com/repos/ninhle9984/Tutorial/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ninhle9984/Tutorial/issues/9/comments","statuses_url":"https://api.github.com/repos/ninhle9984/Tutorial/statuses/e9a087c048dedbe09e6e556ac6c08ef769ad4a79","head":{"label":"ninhle9984:chap8","ref":"chap8","sha":"e9a087c048dedbe09e6e556ac6c08ef769ad4a79","user":{"login":"ninhle9984","id":31109513,"avatar_url":"https://avatars3.githubusercontent.com/u/31109513?v=4","gravatar_id":"","url":"https://api.github.com/users/ninhle9984","html_url":"https://github.com/ninhle9984","followers_url":"https://api.github.com/users/ninhle9984/followers","following_url":"https://api.github.com/users/ninhle9984/following{/other_user}","gists_url":"https://api.github.com/users/ninhle9984/gists{/gist_id}","starred_url":"https://api.github.com/users/ninhle9984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninhle9984/subscriptions","organizations_url":"https://api.github.com/users/ninhle9984/orgs","repos_url":"https://api.github.com/users/ninhle9984/repos","events_url":"https://api.github.com/users/ninhle9984/events{/privacy}","received_events_url":"https://api.github.com/users/ninhle9984/received_events","type":"User","site_admin":false},"repo":{"id":119315539,"name":"Tutorial","full_name":"ninhle9984/Tutorial","owner":{"login":"ninhle9984","id":31109513,"avatar_url":"https://avatars3.githubusercontent.com/u/31109513?v=4","gravatar_id":"","url":"https://api.github.com/users/ninhle9984","html_url":"https://github.com/ninhle9984","followers_url":"https://api.github.com/users/ninhle9984/followers","following_url":"https://api.github.com/users/ninhle9984/following{/other_user}","gists_url":"https://api.github.com/users/ninhle9984/gists{/gist_id}","starred_url":"https://api.github.com/users/ninhle9984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninhle9984/subscriptions","organizations_url":"https://api.github.com/users/ninhle9984/orgs","repos_url":"https://api.github.com/users/ninhle9984/repos","events_url":"https://api.github.com/users/ninhle9984/events{/privacy}","received_events_url":"https://api.github.com/users/ninhle9984/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ninhle9984/Tutorial","description":null,"fork":false,"url":"https://api.github.com/repos/ninhle9984/Tutorial","forks_url":"https://api.github.com/repos/ninhle9984/Tutorial/forks","keys_url":"https://api.github.com/repos/ninhle9984/Tutorial/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ninhle9984/Tutorial/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ninhle9984/Tutorial/teams","hooks_url":"https://api.github.com/repos/ninhle9984/Tutorial/hooks","issue_events_url":"https://api.github.com/repos/ninhle9984/Tutorial/issues/events{/number}","events_url":"https://api.github.com/repos/ninhle9984/Tutorial/events","assignees_url":"https://api.github.com/repos/ninhle9984/Tutorial/assignees{/user}","branches_url":"https://api.github.com/repos/ninhle9984/Tutorial/branches{/branch}","tags_url":"https://api.github.com/repos/ninhle9984/Tutorial/tags","blobs_url":"https://api.github.com/repos/ninhle9984/Tutorial/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ninhle9984/Tutorial/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ninhle9984/Tutorial/git/refs{/sha}","trees_url":"https://api.github.com/repos/ninhle9984/Tutorial/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ninhle9984/Tutorial/statuses/{sha}","languages_url":"https://api.github.com/repos/ninhle9984/Tutorial/languages","stargazers_url":"https://api.github.com/repos/ninhle9984/Tutorial/stargazers","contributors_url":"https://api.github.com/repos/ninhle9984/Tutorial/contributors","subscribers_url":"https://api.github.com/repos/ninhle9984/Tutorial/subscribers","subscription_url":"https://api.github.com/repos/ninhle9984/Tutorial/subscription","commits_url":"https://api.github.com/repos/ninhle9984/Tutorial/commits{/sha}","git_commits_url":"https://api.github.com/repos/ninhle9984/Tutorial/git/commits{/sha}","comments_url":"https://api.github.com/repos/ninhle9984/Tutorial/comments{/number}","issue_comment_url":"https://api.github.com/repos/ninhle9984/Tutorial/issues/comments{/number}","contents_url":"https://api.github.com/repos/ninhle9984/Tutorial/contents/{+path}","compare_url":"https://api.github.com/repos/ninhle9984/Tutorial/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ninhle9984/Tutorial/merges","archive_url":"https://api.github.com/repos/ninhle9984/Tutorial/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ninhle9984/Tutorial/downloads","issues_url":"https://api.github.com/repos/ninhle9984/Tutorial/issues{/number}","pulls_url":"https://api.github.com/repos/ninhle9984/Tutorial/pulls{/number}","milestones_url":"https://api.github.com/repos/ninhle9984/Tutorial/milestones{/number}","notifications_url":"https://api.github.com/repos/ninhle9984/Tutorial/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ninhle9984/Tutorial/labels{/name}","releases_url":"https://api.github.com/repos/ninhle9984/Tutorial/releases{/id}","deployments_url":"https://api.github.com/repos/ninhle9984/Tutorial/deployments","created_at":"2018-01-29T01:26:29Z","updated_at":"2018-01-29T04:15:36Z","pushed_at":"2018-02-22T04:34:21Z","git_url":"git://github.com/ninhle9984/Tutorial.git","ssh_url":"git@github.com:ninhle9984/Tutorial.git","clone_url":"https://github.com/ninhle9984/Tutorial.git","svn_url":"https://github.com/ninhle9984/Tutorial","homepage":null,"size":62,"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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"ninhle9984:master","ref":"master","sha":"9c0c94ad7f62eb14eef3e7c69679a34ef8f5d0e6","user":{"login":"ninhle9984","id":31109513,"avatar_url":"https://avatars3.githubusercontent.com/u/31109513?v=4","gravatar_id":"","url":"https://api.github.com/users/ninhle9984","html_url":"https://github.com/ninhle9984","followers_url":"https://api.github.com/users/ninhle9984/followers","following_url":"https://api.github.com/users/ninhle9984/following{/other_user}","gists_url":"https://api.github.com/users/ninhle9984/gists{/gist_id}","starred_url":"https://api.github.com/users/ninhle9984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninhle9984/subscriptions","organizations_url":"https://api.github.com/users/ninhle9984/orgs","repos_url":"https://api.github.com/users/ninhle9984/repos","events_url":"https://api.github.com/users/ninhle9984/events{/privacy}","received_events_url":"https://api.github.com/users/ninhle9984/received_events","type":"User","site_admin":false},"repo":{"id":119315539,"name":"Tutorial","full_name":"ninhle9984/Tutorial","owner":{"login":"ninhle9984","id":31109513,"avatar_url":"https://avatars3.githubusercontent.com/u/31109513?v=4","gravatar_id":"","url":"https://api.github.com/users/ninhle9984","html_url":"https://github.com/ninhle9984","followers_url":"https://api.github.com/users/ninhle9984/followers","following_url":"https://api.github.com/users/ninhle9984/following{/other_user}","gists_url":"https://api.github.com/users/ninhle9984/gists{/gist_id}","starred_url":"https://api.github.com/users/ninhle9984/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninhle9984/subscriptions","organizations_url":"https://api.github.com/users/ninhle9984/orgs","repos_url":"https://api.github.com/users/ninhle9984/repos","events_url":"https://api.github.com/users/ninhle9984/events{/privacy}","received_events_url":"https://api.github.com/users/ninhle9984/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ninhle9984/Tutorial","description":null,"fork":false,"url":"https://api.github.com/repos/ninhle9984/Tutorial","forks_url":"https://api.github.com/repos/ninhle9984/Tutorial/forks","keys_url":"https://api.github.com/repos/ninhle9984/Tutorial/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ninhle9984/Tutorial/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ninhle9984/Tutorial/teams","hooks_url":"https://api.github.com/repos/ninhle9984/Tutorial/hooks","issue_events_url":"https://api.github.com/repos/ninhle9984/Tutorial/issues/events{/number}","events_url":"https://api.github.com/repos/ninhle9984/Tutorial/events","assignees_url":"https://api.github.com/repos/ninhle9984/Tutorial/assignees{/user}","branches_url":"https://api.github.com/repos/ninhle9984/Tutorial/branches{/branch}","tags_url":"https://api.github.com/repos/ninhle9984/Tutorial/tags","blobs_url":"https://api.github.com/repos/ninhle9984/Tutorial/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ninhle9984/Tutorial/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ninhle9984/Tutorial/git/refs{/sha}","trees_url":"https://api.github.com/repos/ninhle9984/Tutorial/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ninhle9984/Tutorial/statuses/{sha}","languages_url":"https://api.github.com/repos/ninhle9984/Tutorial/languages","stargazers_url":"https://api.github.com/repos/ninhle9984/Tutorial/stargazers","contributors_url":"https://api.github.com/repos/ninhle9984/Tutorial/contributors","subscribers_url":"https://api.github.com/repos/ninhle9984/Tutorial/subscribers","subscription_url":"https://api.github.com/repos/ninhle9984/Tutorial/subscription","commits_url":"https://api.github.com/repos/ninhle9984/Tutorial/commits{/sha}","git_commits_url":"https://api.github.com/repos/ninhle9984/Tutorial/git/commits{/sha}","comments_url":"https://api.github.com/repos/ninhle9984/Tutorial/comments{/number}","issue_comment_url":"https://api.github.com/repos/ninhle9984/Tutorial/issues/comments{/number}","contents_url":"https://api.github.com/repos/ninhle9984/Tutorial/contents/{+path}","compare_url":"https://api.github.com/repos/ninhle9984/Tutorial/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ninhle9984/Tutorial/merges","archive_url":"https://api.github.com/repos/ninhle9984/Tutorial/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ninhle9984/Tutorial/downloads","issues_url":"https://api.github.com/repos/ninhle9984/Tutorial/issues{/number}","pulls_url":"https://api.github.com/repos/ninhle9984/Tutorial/pulls{/number}","milestones_url":"https://api.github.com/repos/ninhle9984/Tutorial/milestones{/number}","notifications_url":"https://api.github.com/repos/ninhle9984/Tutorial/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ninhle9984/Tutorial/labels{/name}","releases_url":"https://api.github.com/repos/ninhle9984/Tutorial/releases{/id}","deployments_url":"https://api.github.com/repos/ninhle9984/Tutorial/deployments","created_at":"2018-01-29T01:26:29Z","updated_at":"2018-01-29T04:15:36Z","pushed_at":"2018-02-22T04:34:21Z","git_url":"git://github.com/ninhle9984/Tutorial.git","ssh_url":"git@github.com:ninhle9984/Tutorial.git","clone_url":"https://github.com/ninhle9984/Tutorial.git","svn_url":"https://github.com/ninhle9984/Tutorial","homepage":null,"size":62,"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":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ninhle9984/Tutorial/pulls/9"},"html":{"href":"https://github.com/ninhle9984/Tutorial/pull/9"},"issue":{"href":"https://api.github.com/repos/ninhle9984/Tutorial/issues/9"},"comments":{"href":"https://api.github.com/repos/ninhle9984/Tutorial/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/ninhle9984/Tutorial/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/ninhle9984/Tutorial/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ninhle9984/Tutorial/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/ninhle9984/Tutorial/statuses/e9a087c048dedbe09e6e556ac6c08ef769ad4a79"}},"author_association":"OWNER"}}
{"actor":{"display_login":"ninhle9984"}}