{"action":"created","comment":{"url":"https://api.github.com/repos/yeunuthongminh/Demo/pulls/comments/72207359","id":72207359,"diff_hunk":"@@ -3,15 +3,36 @@ def log_in user\n     session[:user_id] = user.id\n   end\n \n+  def remember user\n+    user.remember\n+    cookies.permanent.signed[:user_id] = user_id\n+    cookies.permanent[:remember_token] = user.remember_token\n+  end\n+\n   def current_user\n-    @current_user ||= User.find_by id: session[:user_id]\n+    if user_id =session[:user_id]","path":"app/helpers/sessions_helper.rb","position":12,"original_position":12,"commit_id":"9a9789965cf0dfad4ae166d608ced7c9340ac95a","original_commit_id":"9a9789965cf0dfad4ae166d608ced7c9340ac95a","user":{"login":"hellovietnam93","id":8023606,"avatar_url":"https://avatars.githubusercontent.com/u/8023606?v=3","gravatar_id":"","url":"https://api.github.com/users/hellovietnam93","html_url":"https://github.com/hellovietnam93","followers_url":"https://api.github.com/users/hellovietnam93/followers","following_url":"https://api.github.com/users/hellovietnam93/following{/other_user}","gists_url":"https://api.github.com/users/hellovietnam93/gists{/gist_id}","starred_url":"https://api.github.com/users/hellovietnam93/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hellovietnam93/subscriptions","organizations_url":"https://api.github.com/users/hellovietnam93/orgs","repos_url":"https://api.github.com/users/hellovietnam93/repos","events_url":"https://api.github.com/users/hellovietnam93/events{/privacy}","received_events_url":"https://api.github.com/users/hellovietnam93/received_events","type":"User","site_admin":false},"body":"convention","created_at":"2016-07-26T08:25:22Z","updated_at":"2016-07-26T08:25:22Z","html_url":"https://github.com/yeunuthongminh/Demo/pull/7#discussion_r72207359","pull_request_url":"https://api.github.com/repos/yeunuthongminh/Demo/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/yeunuthongminh/Demo/pulls/comments/72207359"},"html":{"href":"https://github.com/yeunuthongminh/Demo/pull/7#discussion_r72207359"},"pull_request":{"href":"https://api.github.com/repos/yeunuthongminh/Demo/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/yeunuthongminh/Demo/pulls/7","id":78793542,"html_url":"https://github.com/yeunuthongminh/Demo/pull/7","diff_url":"https://github.com/yeunuthongminh/Demo/pull/7.diff","patch_url":"https://github.com/yeunuthongminh/Demo/pull/7.patch","issue_url":"https://api.github.com/repos/yeunuthongminh/Demo/issues/7","number":7,"state":"open","locked":false,"title":"Advanced login","user":{"login":"yeunuthongminh","id":20291773,"avatar_url":"https://avatars.githubusercontent.com/u/20291773?v=3","gravatar_id":"","url":"https://api.github.com/users/yeunuthongminh","html_url":"https://github.com/yeunuthongminh","followers_url":"https://api.github.com/users/yeunuthongminh/followers","following_url":"https://api.github.com/users/yeunuthongminh/following{/other_user}","gists_url":"https://api.github.com/users/yeunuthongminh/gists{/gist_id}","starred_url":"https://api.github.com/users/yeunuthongminh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeunuthongminh/subscriptions","organizations_url":"https://api.github.com/users/yeunuthongminh/orgs","repos_url":"https://api.github.com/users/yeunuthongminh/repos","events_url":"https://api.github.com/users/yeunuthongminh/events{/privacy}","received_events_url":"https://api.github.com/users/yeunuthongminh/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-26T05:29:30Z","updated_at":"2016-07-26T08:25:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b5cbe89adba5cfe47d206cf13cd53bb630c4f0a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/yeunuthongminh/Demo/pulls/7/commits","review_comments_url":"https://api.github.com/repos/yeunuthongminh/Demo/pulls/7/comments","review_comment_url":"https://api.github.com/repos/yeunuthongminh/Demo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yeunuthongminh/Demo/issues/7/comments","statuses_url":"https://api.github.com/repos/yeunuthongminh/Demo/statuses/9a9789965cf0dfad4ae166d608ced7c9340ac95a","head":{"label":"yeunuthongminh:advanced-login","ref":"advanced-login","sha":"9a9789965cf0dfad4ae166d608ced7c9340ac95a","user":{"login":"yeunuthongminh","id":20291773,"avatar_url":"https://avatars.githubusercontent.com/u/20291773?v=3","gravatar_id":"","url":"https://api.github.com/users/yeunuthongminh","html_url":"https://github.com/yeunuthongminh","followers_url":"https://api.github.com/users/yeunuthongminh/followers","following_url":"https://api.github.com/users/yeunuthongminh/following{/other_user}","gists_url":"https://api.github.com/users/yeunuthongminh/gists{/gist_id}","starred_url":"https://api.github.com/users/yeunuthongminh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeunuthongminh/subscriptions","organizations_url":"https://api.github.com/users/yeunuthongminh/orgs","repos_url":"https://api.github.com/users/yeunuthongminh/repos","events_url":"https://api.github.com/users/yeunuthongminh/events{/privacy}","received_events_url":"https://api.github.com/users/yeunuthongminh/received_events","type":"User","site_admin":false},"repo":{"id":63856019,"name":"Demo","full_name":"yeunuthongminh/Demo","owner":{"login":"yeunuthongminh","id":20291773,"avatar_url":"https://avatars.githubusercontent.com/u/20291773?v=3","gravatar_id":"","url":"https://api.github.com/users/yeunuthongminh","html_url":"https://github.com/yeunuthongminh","followers_url":"https://api.github.com/users/yeunuthongminh/followers","following_url":"https://api.github.com/users/yeunuthongminh/following{/other_user}","gists_url":"https://api.github.com/users/yeunuthongminh/gists{/gist_id}","starred_url":"https://api.github.com/users/yeunuthongminh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeunuthongminh/subscriptions","organizations_url":"https://api.github.com/users/yeunuthongminh/orgs","repos_url":"https://api.github.com/users/yeunuthongminh/repos","events_url":"https://api.github.com/users/yeunuthongminh/events{/privacy}","received_events_url":"https://api.github.com/users/yeunuthongminh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yeunuthongminh/Demo","description":null,"fork":false,"url":"https://api.github.com/repos/yeunuthongminh/Demo","forks_url":"https://api.github.com/repos/yeunuthongminh/Demo/forks","keys_url":"https://api.github.com/repos/yeunuthongminh/Demo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yeunuthongminh/Demo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yeunuthongminh/Demo/teams","hooks_url":"https://api.github.com/repos/yeunuthongminh/Demo/hooks","issue_events_url":"https://api.github.com/repos/yeunuthongminh/Demo/issues/events{/number}","events_url":"https://api.github.com/repos/yeunuthongminh/Demo/events","assignees_url":"https://api.github.com/repos/yeunuthongminh/Demo/assignees{/user}","branches_url":"https://api.github.com/repos/yeunuthongminh/Demo/branches{/branch}","tags_url":"https://api.github.com/repos/yeunuthongminh/Demo/tags","blobs_url":"https://api.github.com/repos/yeunuthongminh/Demo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yeunuthongminh/Demo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yeunuthongminh/Demo/git/refs{/sha}","trees_url":"https://api.github.com/repos/yeunuthongminh/Demo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yeunuthongminh/Demo/statuses/{sha}","languages_url":"https://api.github.com/repos/yeunuthongminh/Demo/languages","stargazers_url":"https://api.github.com/repos/yeunuthongminh/Demo/stargazers","contributors_url":"https://api.github.com/repos/yeunuthongminh/Demo/contributors","subscribers_url":"https://api.github.com/repos/yeunuthongminh/Demo/subscribers","subscription_url":"https://api.github.com/repos/yeunuthongminh/Demo/subscription","commits_url":"https://api.github.com/repos/yeunuthongminh/Demo/commits{/sha}","git_commits_url":"https://api.github.com/repos/yeunuthongminh/Demo/git/commits{/sha}","comments_url":"https://api.github.com/repos/yeunuthongminh/Demo/comments{/number}","issue_comment_url":"https://api.github.com/repos/yeunuthongminh/Demo/issues/comments{/number}","contents_url":"https://api.github.com/repos/yeunuthongminh/Demo/contents/{+path}","compare_url":"https://api.github.com/repos/yeunuthongminh/Demo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yeunuthongminh/Demo/merges","archive_url":"https://api.github.com/repos/yeunuthongminh/Demo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yeunuthongminh/Demo/downloads","issues_url":"https://api.github.com/repos/yeunuthongminh/Demo/issues{/number}","pulls_url":"https://api.github.com/repos/yeunuthongminh/Demo/pulls{/number}","milestones_url":"https://api.github.com/repos/yeunuthongminh/Demo/milestones{/number}","notifications_url":"https://api.github.com/repos/yeunuthongminh/Demo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yeunuthongminh/Demo/labels{/name}","releases_url":"https://api.github.com/repos/yeunuthongminh/Demo/releases{/id}","deployments_url":"https://api.github.com/repos/yeunuthongminh/Demo/deployments","created_at":"2016-07-21T09:28:30Z","updated_at":"2016-07-21T09:29:35Z","pushed_at":"2016-07-26T08:22:09Z","git_url":"git://github.com/yeunuthongminh/Demo.git","ssh_url":"git@github.com:yeunuthongminh/Demo.git","clone_url":"https://github.com/yeunuthongminh/Demo.git","svn_url":"https://github.com/yeunuthongminh/Demo","homepage":null,"size":86,"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":"yeunuthongminh:master","ref":"master","sha":"5aba426f0529e32c4baa5b78b9c8ebaec952d78d","user":{"login":"yeunuthongminh","id":20291773,"avatar_url":"https://avatars.githubusercontent.com/u/20291773?v=3","gravatar_id":"","url":"https://api.github.com/users/yeunuthongminh","html_url":"https://github.com/yeunuthongminh","followers_url":"https://api.github.com/users/yeunuthongminh/followers","following_url":"https://api.github.com/users/yeunuthongminh/following{/other_user}","gists_url":"https://api.github.com/users/yeunuthongminh/gists{/gist_id}","starred_url":"https://api.github.com/users/yeunuthongminh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeunuthongminh/subscriptions","organizations_url":"https://api.github.com/users/yeunuthongminh/orgs","repos_url":"https://api.github.com/users/yeunuthongminh/repos","events_url":"https://api.github.com/users/yeunuthongminh/events{/privacy}","received_events_url":"https://api.github.com/users/yeunuthongminh/received_events","type":"User","site_admin":false},"repo":{"id":63856019,"name":"Demo","full_name":"yeunuthongminh/Demo","owner":{"login":"yeunuthongminh","id":20291773,"avatar_url":"https://avatars.githubusercontent.com/u/20291773?v=3","gravatar_id":"","url":"https://api.github.com/users/yeunuthongminh","html_url":"https://github.com/yeunuthongminh","followers_url":"https://api.github.com/users/yeunuthongminh/followers","following_url":"https://api.github.com/users/yeunuthongminh/following{/other_user}","gists_url":"https://api.github.com/users/yeunuthongminh/gists{/gist_id}","starred_url":"https://api.github.com/users/yeunuthongminh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeunuthongminh/subscriptions","organizations_url":"https://api.github.com/users/yeunuthongminh/orgs","repos_url":"https://api.github.com/users/yeunuthongminh/repos","events_url":"https://api.github.com/users/yeunuthongminh/events{/privacy}","received_events_url":"https://api.github.com/users/yeunuthongminh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yeunuthongminh/Demo","description":null,"fork":false,"url":"https://api.github.com/repos/yeunuthongminh/Demo","forks_url":"https://api.github.com/repos/yeunuthongminh/Demo/forks","keys_url":"https://api.github.com/repos/yeunuthongminh/Demo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yeunuthongminh/Demo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yeunuthongminh/Demo/teams","hooks_url":"https://api.github.com/repos/yeunuthongminh/Demo/hooks","issue_events_url":"https://api.github.com/repos/yeunuthongminh/Demo/issues/events{/number}","events_url":"https://api.github.com/repos/yeunuthongminh/Demo/events","assignees_url":"https://api.github.com/repos/yeunuthongminh/Demo/assignees{/user}","branches_url":"https://api.github.com/repos/yeunuthongminh/Demo/branches{/branch}","tags_url":"https://api.github.com/repos/yeunuthongminh/Demo/tags","blobs_url":"https://api.github.com/repos/yeunuthongminh/Demo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yeunuthongminh/Demo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yeunuthongminh/Demo/git/refs{/sha}","trees_url":"https://api.github.com/repos/yeunuthongminh/Demo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yeunuthongminh/Demo/statuses/{sha}","languages_url":"https://api.github.com/repos/yeunuthongminh/Demo/languages","stargazers_url":"https://api.github.com/repos/yeunuthongminh/Demo/stargazers","contributors_url":"https://api.github.com/repos/yeunuthongminh/Demo/contributors","subscribers_url":"https://api.github.com/repos/yeunuthongminh/Demo/subscribers","subscription_url":"https://api.github.com/repos/yeunuthongminh/Demo/subscription","commits_url":"https://api.github.com/repos/yeunuthongminh/Demo/commits{/sha}","git_commits_url":"https://api.github.com/repos/yeunuthongminh/Demo/git/commits{/sha}","comments_url":"https://api.github.com/repos/yeunuthongminh/Demo/comments{/number}","issue_comment_url":"https://api.github.com/repos/yeunuthongminh/Demo/issues/comments{/number}","contents_url":"https://api.github.com/repos/yeunuthongminh/Demo/contents/{+path}","compare_url":"https://api.github.com/repos/yeunuthongminh/Demo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yeunuthongminh/Demo/merges","archive_url":"https://api.github.com/repos/yeunuthongminh/Demo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yeunuthongminh/Demo/downloads","issues_url":"https://api.github.com/repos/yeunuthongminh/Demo/issues{/number}","pulls_url":"https://api.github.com/repos/yeunuthongminh/Demo/pulls{/number}","milestones_url":"https://api.github.com/repos/yeunuthongminh/Demo/milestones{/number}","notifications_url":"https://api.github.com/repos/yeunuthongminh/Demo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yeunuthongminh/Demo/labels{/name}","releases_url":"https://api.github.com/repos/yeunuthongminh/Demo/releases{/id}","deployments_url":"https://api.github.com/repos/yeunuthongminh/Demo/deployments","created_at":"2016-07-21T09:28:30Z","updated_at":"2016-07-21T09:29:35Z","pushed_at":"2016-07-26T08:22:09Z","git_url":"git://github.com/yeunuthongminh/Demo.git","ssh_url":"git@github.com:yeunuthongminh/Demo.git","clone_url":"https://github.com/yeunuthongminh/Demo.git","svn_url":"https://github.com/yeunuthongminh/Demo","homepage":null,"size":86,"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/yeunuthongminh/Demo/pulls/7"},"html":{"href":"https://github.com/yeunuthongminh/Demo/pull/7"},"issue":{"href":"https://api.github.com/repos/yeunuthongminh/Demo/issues/7"},"comments":{"href":"https://api.github.com/repos/yeunuthongminh/Demo/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/yeunuthongminh/Demo/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/yeunuthongminh/Demo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yeunuthongminh/Demo/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/yeunuthongminh/Demo/statuses/9a9789965cf0dfad4ae166d608ced7c9340ac95a"}}}}
{"actor":{"display_login":"hellovietnam93"}}