{"action":"created","comment":{"url":"https://api.github.com/repos/framgia/fels_69/pulls/comments/34651676","id":34651676,"diff_hunk":"@@ -19,6 +20,28 @@ def User.digest string\n     BCrypt::Password.create string, cost: cost\n   end\n \n+  # Returns a random token.\n+  def User.new_token\n+    SecureRandom.urlsafe_base64\n+  end\n+\n+  # Remembers a user in the database for use in persistent sessions.\n+  def remember\n+    self.remember_token = User.new_token\n+    update_attribute(:remember_digest, User.digest(remember_token))","path":"app/models/user.rb","position":18,"original_position":18,"commit_id":"3d404e5ff032525f623ef51c9cc8aad012213f81","original_commit_id":"3d404e5ff032525f623ef51c9cc8aad012213f81","user":{"login":"chuanhtuan","id":5590771,"avatar_url":"https://avatars.githubusercontent.com/u/5590771?v=3","gravatar_id":"","url":"https://api.github.com/users/chuanhtuan","html_url":"https://github.com/chuanhtuan","followers_url":"https://api.github.com/users/chuanhtuan/followers","following_url":"https://api.github.com/users/chuanhtuan/following{/other_user}","gists_url":"https://api.github.com/users/chuanhtuan/gists{/gist_id}","starred_url":"https://api.github.com/users/chuanhtuan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chuanhtuan/subscriptions","organizations_url":"https://api.github.com/users/chuanhtuan/orgs","repos_url":"https://api.github.com/users/chuanhtuan/repos","events_url":"https://api.github.com/users/chuanhtuan/events{/privacy}","received_events_url":"https://api.github.com/users/chuanhtuan/received_events","type":"User","site_admin":false},"body":"use update_attributes instead of update_attribute","created_at":"2015-07-15T07:20:46Z","updated_at":"2015-07-15T07:20:46Z","html_url":"https://github.com/framgia/fels_69/pull/4#discussion_r34651676","pull_request_url":"https://api.github.com/repos/framgia/fels_69/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_69/pulls/comments/34651676"},"html":{"href":"https://github.com/framgia/fels_69/pull/4#discussion_r34651676"},"pull_request":{"href":"https://api.github.com/repos/framgia/fels_69/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/framgia/fels_69/pulls/4","id":39991643,"html_url":"https://github.com/framgia/fels_69/pull/4","diff_url":"https://github.com/framgia/fels_69/pull/4.diff","patch_url":"https://github.com/framgia/fels_69/pull/4.patch","issue_url":"https://api.github.com/repos/framgia/fels_69/issues/4","number":4,"state":"open","locked":false,"title":"refs #34758 Finish login logout remember me","user":{"login":"namson168","id":5938399,"avatar_url":"https://avatars.githubusercontent.com/u/5938399?v=3","gravatar_id":"","url":"https://api.github.com/users/namson168","html_url":"https://github.com/namson168","followers_url":"https://api.github.com/users/namson168/followers","following_url":"https://api.github.com/users/namson168/following{/other_user}","gists_url":"https://api.github.com/users/namson168/gists{/gist_id}","starred_url":"https://api.github.com/users/namson168/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namson168/subscriptions","organizations_url":"https://api.github.com/users/namson168/orgs","repos_url":"https://api.github.com/users/namson168/repos","events_url":"https://api.github.com/users/namson168/events{/privacy}","received_events_url":"https://api.github.com/users/namson168/received_events","type":"User","site_admin":false},"body":"I have created new pull request, check it please","created_at":"2015-07-15T06:28:46Z","updated_at":"2015-07-15T07:20:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eac26f99e12b84e50b593d7a4af11880c18d43cb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/framgia/fels_69/pulls/4/commits","review_comments_url":"https://api.github.com/repos/framgia/fels_69/pulls/4/comments","review_comment_url":"https://api.github.com/repos/framgia/fels_69/pulls/comments{/number}","comments_url":"https://api.github.com/repos/framgia/fels_69/issues/4/comments","statuses_url":"https://api.github.com/repos/framgia/fels_69/statuses/3d404e5ff032525f623ef51c9cc8aad012213f81","head":{"label":"namson168:task-34758","ref":"task-34758","sha":"3d404e5ff032525f623ef51c9cc8aad012213f81","user":{"login":"namson168","id":5938399,"avatar_url":"https://avatars.githubusercontent.com/u/5938399?v=3","gravatar_id":"","url":"https://api.github.com/users/namson168","html_url":"https://github.com/namson168","followers_url":"https://api.github.com/users/namson168/followers","following_url":"https://api.github.com/users/namson168/following{/other_user}","gists_url":"https://api.github.com/users/namson168/gists{/gist_id}","starred_url":"https://api.github.com/users/namson168/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namson168/subscriptions","organizations_url":"https://api.github.com/users/namson168/orgs","repos_url":"https://api.github.com/users/namson168/repos","events_url":"https://api.github.com/users/namson168/events{/privacy}","received_events_url":"https://api.github.com/users/namson168/received_events","type":"User","site_admin":false},"repo":{"id":38866174,"name":"fels_69","full_name":"namson168/fels_69","owner":{"login":"namson168","id":5938399,"avatar_url":"https://avatars.githubusercontent.com/u/5938399?v=3","gravatar_id":"","url":"https://api.github.com/users/namson168","html_url":"https://github.com/namson168","followers_url":"https://api.github.com/users/namson168/followers","following_url":"https://api.github.com/users/namson168/following{/other_user}","gists_url":"https://api.github.com/users/namson168/gists{/gist_id}","starred_url":"https://api.github.com/users/namson168/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namson168/subscriptions","organizations_url":"https://api.github.com/users/namson168/orgs","repos_url":"https://api.github.com/users/namson168/repos","events_url":"https://api.github.com/users/namson168/events{/privacy}","received_events_url":"https://api.github.com/users/namson168/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/namson168/fels_69","description":"Framgia E-Learning System (training)","fork":true,"url":"https://api.github.com/repos/namson168/fels_69","forks_url":"https://api.github.com/repos/namson168/fels_69/forks","keys_url":"https://api.github.com/repos/namson168/fels_69/keys{/key_id}","collaborators_url":"https://api.github.com/repos/namson168/fels_69/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/namson168/fels_69/teams","hooks_url":"https://api.github.com/repos/namson168/fels_69/hooks","issue_events_url":"https://api.github.com/repos/namson168/fels_69/issues/events{/number}","events_url":"https://api.github.com/repos/namson168/fels_69/events","assignees_url":"https://api.github.com/repos/namson168/fels_69/assignees{/user}","branches_url":"https://api.github.com/repos/namson168/fels_69/branches{/branch}","tags_url":"https://api.github.com/repos/namson168/fels_69/tags","blobs_url":"https://api.github.com/repos/namson168/fels_69/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/namson168/fels_69/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/namson168/fels_69/git/refs{/sha}","trees_url":"https://api.github.com/repos/namson168/fels_69/git/trees{/sha}","statuses_url":"https://api.github.com/repos/namson168/fels_69/statuses/{sha}","languages_url":"https://api.github.com/repos/namson168/fels_69/languages","stargazers_url":"https://api.github.com/repos/namson168/fels_69/stargazers","contributors_url":"https://api.github.com/repos/namson168/fels_69/contributors","subscribers_url":"https://api.github.com/repos/namson168/fels_69/subscribers","subscription_url":"https://api.github.com/repos/namson168/fels_69/subscription","commits_url":"https://api.github.com/repos/namson168/fels_69/commits{/sha}","git_commits_url":"https://api.github.com/repos/namson168/fels_69/git/commits{/sha}","comments_url":"https://api.github.com/repos/namson168/fels_69/comments{/number}","issue_comment_url":"https://api.github.com/repos/namson168/fels_69/issues/comments{/number}","contents_url":"https://api.github.com/repos/namson168/fels_69/contents/{+path}","compare_url":"https://api.github.com/repos/namson168/fels_69/compare/{base}...{head}","merges_url":"https://api.github.com/repos/namson168/fels_69/merges","archive_url":"https://api.github.com/repos/namson168/fels_69/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/namson168/fels_69/downloads","issues_url":"https://api.github.com/repos/namson168/fels_69/issues{/number}","pulls_url":"https://api.github.com/repos/namson168/fels_69/pulls{/number}","milestones_url":"https://api.github.com/repos/namson168/fels_69/milestones{/number}","notifications_url":"https://api.github.com/repos/namson168/fels_69/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/namson168/fels_69/labels{/name}","releases_url":"https://api.github.com/repos/namson168/fels_69/releases{/id}","created_at":"2015-07-10T07:02:15Z","updated_at":"2015-07-10T06:46:36Z","pushed_at":"2015-07-15T06:54:15Z","git_url":"git://github.com/namson168/fels_69.git","ssh_url":"git@github.com:namson168/fels_69.git","clone_url":"https://github.com/namson168/fels_69.git","svn_url":"https://github.com/namson168/fels_69","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"framgia:develop","ref":"develop","sha":"2fb87565b8e82a035f9546ef90a9c5a8bb1478ac","user":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"repo":{"id":38865575,"name":"fels_69","full_name":"framgia/fels_69","owner":{"login":"framgia","id":2322183,"avatar_url":"https://avatars.githubusercontent.com/u/2322183?v=3","gravatar_id":"","url":"https://api.github.com/users/framgia","html_url":"https://github.com/framgia","followers_url":"https://api.github.com/users/framgia/followers","following_url":"https://api.github.com/users/framgia/following{/other_user}","gists_url":"https://api.github.com/users/framgia/gists{/gist_id}","starred_url":"https://api.github.com/users/framgia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/framgia/subscriptions","organizations_url":"https://api.github.com/users/framgia/orgs","repos_url":"https://api.github.com/users/framgia/repos","events_url":"https://api.github.com/users/framgia/events{/privacy}","received_events_url":"https://api.github.com/users/framgia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/framgia/fels_69","description":"Framgia E-Learning System (training)","fork":false,"url":"https://api.github.com/repos/framgia/fels_69","forks_url":"https://api.github.com/repos/framgia/fels_69/forks","keys_url":"https://api.github.com/repos/framgia/fels_69/keys{/key_id}","collaborators_url":"https://api.github.com/repos/framgia/fels_69/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/framgia/fels_69/teams","hooks_url":"https://api.github.com/repos/framgia/fels_69/hooks","issue_events_url":"https://api.github.com/repos/framgia/fels_69/issues/events{/number}","events_url":"https://api.github.com/repos/framgia/fels_69/events","assignees_url":"https://api.github.com/repos/framgia/fels_69/assignees{/user}","branches_url":"https://api.github.com/repos/framgia/fels_69/branches{/branch}","tags_url":"https://api.github.com/repos/framgia/fels_69/tags","blobs_url":"https://api.github.com/repos/framgia/fels_69/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/framgia/fels_69/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/framgia/fels_69/git/refs{/sha}","trees_url":"https://api.github.com/repos/framgia/fels_69/git/trees{/sha}","statuses_url":"https://api.github.com/repos/framgia/fels_69/statuses/{sha}","languages_url":"https://api.github.com/repos/framgia/fels_69/languages","stargazers_url":"https://api.github.com/repos/framgia/fels_69/stargazers","contributors_url":"https://api.github.com/repos/framgia/fels_69/contributors","subscribers_url":"https://api.github.com/repos/framgia/fels_69/subscribers","subscription_url":"https://api.github.com/repos/framgia/fels_69/subscription","commits_url":"https://api.github.com/repos/framgia/fels_69/commits{/sha}","git_commits_url":"https://api.github.com/repos/framgia/fels_69/git/commits{/sha}","comments_url":"https://api.github.com/repos/framgia/fels_69/comments{/number}","issue_comment_url":"https://api.github.com/repos/framgia/fels_69/issues/comments{/number}","contents_url":"https://api.github.com/repos/framgia/fels_69/contents/{+path}","compare_url":"https://api.github.com/repos/framgia/fels_69/compare/{base}...{head}","merges_url":"https://api.github.com/repos/framgia/fels_69/merges","archive_url":"https://api.github.com/repos/framgia/fels_69/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/framgia/fels_69/downloads","issues_url":"https://api.github.com/repos/framgia/fels_69/issues{/number}","pulls_url":"https://api.github.com/repos/framgia/fels_69/pulls{/number}","milestones_url":"https://api.github.com/repos/framgia/fels_69/milestones{/number}","notifications_url":"https://api.github.com/repos/framgia/fels_69/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/framgia/fels_69/labels{/name}","releases_url":"https://api.github.com/repos/framgia/fels_69/releases{/id}","created_at":"2015-07-10T06:46:36Z","updated_at":"2015-07-10T06:46:36Z","pushed_at":"2015-07-15T06:54:16Z","git_url":"git://github.com/framgia/fels_69.git","ssh_url":"git@github.com:framgia/fels_69.git","clone_url":"https://github.com/framgia/fels_69.git","svn_url":"https://github.com/framgia/fels_69","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/framgia/fels_69/pulls/4"},"html":{"href":"https://github.com/framgia/fels_69/pull/4"},"issue":{"href":"https://api.github.com/repos/framgia/fels_69/issues/4"},"comments":{"href":"https://api.github.com/repos/framgia/fels_69/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/framgia/fels_69/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/framgia/fels_69/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/framgia/fels_69/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/framgia/fels_69/statuses/3d404e5ff032525f623ef51c9cc8aad012213f81"}}}}