{"action":"created","comment":{"url":"https://api.github.com/repos/nammonpx/sample_app/pulls/comments/134960977","pull_request_review_id":58313705,"id":134960977,"diff_hunk":"@@ -26,12 +28,32 @@ def remember\n     update_attributes remember_digest: User.digest(remember_token)\n   end\n \n-  def authenticated? remember_token\n+  def authenticated? attribute, token\n+    digest = self.send(\"#{attribute}_digest\")\n     return false if remember_digest.nil?\n     BCrypt::Password.new(remember_digest).is_password? remember_token\n   end\n \n   def forget\n-    update_attribute :remember_digest, nil\n+    update_attributes :remember_digest, nil\n+  end\n+\n+  def activate\n+    update_attribute activated: true, activated_at: Time.zone.now\n+  end\n+\n+  def send_activation_email\n+    UserMailer.account_activation(self).deliver\n+  end\n+\n+  private\n+\n+  def downcase_email\n+    self.email = email.downcase!","path":"app/models/user.rb","position":39,"original_position":39,"commit_id":"1194cbd289ceec9bc019e7908598f6e43ae06d86","original_commit_id":"1194cbd289ceec9bc019e7908598f6e43ae06d86","user":{"login":"huongnguyenmta","id":18224922,"avatar_url":"https://avatars3.githubusercontent.com/u/18224922?v=4","gravatar_id":"","url":"https://api.github.com/users/huongnguyenmta","html_url":"https://github.com/huongnguyenmta","followers_url":"https://api.github.com/users/huongnguyenmta/followers","following_url":"https://api.github.com/users/huongnguyenmta/following{/other_user}","gists_url":"https://api.github.com/users/huongnguyenmta/gists{/gist_id}","starred_url":"https://api.github.com/users/huongnguyenmta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huongnguyenmta/subscriptions","organizations_url":"https://api.github.com/users/huongnguyenmta/orgs","repos_url":"https://api.github.com/users/huongnguyenmta/repos","events_url":"https://api.github.com/users/huongnguyenmta/events{/privacy}","received_events_url":"https://api.github.com/users/huongnguyenmta/received_events","type":"User","site_admin":false},"body":"Cỗ này dùng như này là đủ rồi nhé: `email.downcase!`","created_at":"2017-08-24T08:53:36Z","updated_at":"2017-08-24T08:54:22Z","html_url":"https://github.com/nammonpx/sample_app/pull/11#discussion_r134960977","pull_request_url":"https://api.github.com/repos/nammonpx/sample_app/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/nammonpx/sample_app/pulls/comments/134960977"},"html":{"href":"https://github.com/nammonpx/sample_app/pull/11#discussion_r134960977"},"pull_request":{"href":"https://api.github.com/repos/nammonpx/sample_app/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/nammonpx/sample_app/pulls/11","id":137227728,"html_url":"https://github.com/nammonpx/sample_app/pull/11","diff_url":"https://github.com/nammonpx/sample_app/pull/11.diff","patch_url":"https://github.com/nammonpx/sample_app/pull/11.patch","issue_url":"https://api.github.com/repos/nammonpx/sample_app/issues/11","number":11,"state":"open","locked":false,"title":"finish account-activation","user":{"login":"nammonpx","id":30396354,"avatar_url":"https://avatars1.githubusercontent.com/u/30396354?v=4","gravatar_id":"","url":"https://api.github.com/users/nammonpx","html_url":"https://github.com/nammonpx","followers_url":"https://api.github.com/users/nammonpx/followers","following_url":"https://api.github.com/users/nammonpx/following{/other_user}","gists_url":"https://api.github.com/users/nammonpx/gists{/gist_id}","starred_url":"https://api.github.com/users/nammonpx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nammonpx/subscriptions","organizations_url":"https://api.github.com/users/nammonpx/orgs","repos_url":"https://api.github.com/users/nammonpx/repos","events_url":"https://api.github.com/users/nammonpx/events{/privacy}","received_events_url":"https://api.github.com/users/nammonpx/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-08-23T14:06:38Z","updated_at":"2017-08-24T08:54:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec1d3ca9027b79d94fc5e5f08c4718b633b6c984","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/nammonpx/sample_app/pulls/11/commits","review_comments_url":"https://api.github.com/repos/nammonpx/sample_app/pulls/11/comments","review_comment_url":"https://api.github.com/repos/nammonpx/sample_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nammonpx/sample_app/issues/11/comments","statuses_url":"https://api.github.com/repos/nammonpx/sample_app/statuses/1194cbd289ceec9bc019e7908598f6e43ae06d86","head":{"label":"nammonpx:account-activation","ref":"account-activation","sha":"1194cbd289ceec9bc019e7908598f6e43ae06d86","user":{"login":"nammonpx","id":30396354,"avatar_url":"https://avatars1.githubusercontent.com/u/30396354?v=4","gravatar_id":"","url":"https://api.github.com/users/nammonpx","html_url":"https://github.com/nammonpx","followers_url":"https://api.github.com/users/nammonpx/followers","following_url":"https://api.github.com/users/nammonpx/following{/other_user}","gists_url":"https://api.github.com/users/nammonpx/gists{/gist_id}","starred_url":"https://api.github.com/users/nammonpx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nammonpx/subscriptions","organizations_url":"https://api.github.com/users/nammonpx/orgs","repos_url":"https://api.github.com/users/nammonpx/repos","events_url":"https://api.github.com/users/nammonpx/events{/privacy}","received_events_url":"https://api.github.com/users/nammonpx/received_events","type":"User","site_admin":false},"repo":{"id":99091074,"name":"sample_app","full_name":"nammonpx/sample_app","owner":{"login":"nammonpx","id":30396354,"avatar_url":"https://avatars1.githubusercontent.com/u/30396354?v=4","gravatar_id":"","url":"https://api.github.com/users/nammonpx","html_url":"https://github.com/nammonpx","followers_url":"https://api.github.com/users/nammonpx/followers","following_url":"https://api.github.com/users/nammonpx/following{/other_user}","gists_url":"https://api.github.com/users/nammonpx/gists{/gist_id}","starred_url":"https://api.github.com/users/nammonpx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nammonpx/subscriptions","organizations_url":"https://api.github.com/users/nammonpx/orgs","repos_url":"https://api.github.com/users/nammonpx/repos","events_url":"https://api.github.com/users/nammonpx/events{/privacy}","received_events_url":"https://api.github.com/users/nammonpx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nammonpx/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/nammonpx/sample_app","forks_url":"https://api.github.com/repos/nammonpx/sample_app/forks","keys_url":"https://api.github.com/repos/nammonpx/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nammonpx/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nammonpx/sample_app/teams","hooks_url":"https://api.github.com/repos/nammonpx/sample_app/hooks","issue_events_url":"https://api.github.com/repos/nammonpx/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/nammonpx/sample_app/events","assignees_url":"https://api.github.com/repos/nammonpx/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/nammonpx/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/nammonpx/sample_app/tags","blobs_url":"https://api.github.com/repos/nammonpx/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nammonpx/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nammonpx/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/nammonpx/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nammonpx/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/nammonpx/sample_app/languages","stargazers_url":"https://api.github.com/repos/nammonpx/sample_app/stargazers","contributors_url":"https://api.github.com/repos/nammonpx/sample_app/contributors","subscribers_url":"https://api.github.com/repos/nammonpx/sample_app/subscribers","subscription_url":"https://api.github.com/repos/nammonpx/sample_app/subscription","commits_url":"https://api.github.com/repos/nammonpx/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/nammonpx/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/nammonpx/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/nammonpx/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/nammonpx/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/nammonpx/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nammonpx/sample_app/merges","archive_url":"https://api.github.com/repos/nammonpx/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nammonpx/sample_app/downloads","issues_url":"https://api.github.com/repos/nammonpx/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/nammonpx/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/nammonpx/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/nammonpx/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nammonpx/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/nammonpx/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/nammonpx/sample_app/deployments","created_at":"2017-08-02T08:19:22Z","updated_at":"2017-08-02T08:57:06Z","pushed_at":"2017-08-24T08:47:44Z","git_url":"git://github.com/nammonpx/sample_app.git","ssh_url":"git@github.com:nammonpx/sample_app.git","clone_url":"https://github.com/nammonpx/sample_app.git","svn_url":"https://github.com/nammonpx/sample_app","homepage":null,"size":2267,"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,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"nammonpx:develop","ref":"develop","sha":"da74b0e30bad9030aacb802792092cd2f720866c","user":{"login":"nammonpx","id":30396354,"avatar_url":"https://avatars1.githubusercontent.com/u/30396354?v=4","gravatar_id":"","url":"https://api.github.com/users/nammonpx","html_url":"https://github.com/nammonpx","followers_url":"https://api.github.com/users/nammonpx/followers","following_url":"https://api.github.com/users/nammonpx/following{/other_user}","gists_url":"https://api.github.com/users/nammonpx/gists{/gist_id}","starred_url":"https://api.github.com/users/nammonpx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nammonpx/subscriptions","organizations_url":"https://api.github.com/users/nammonpx/orgs","repos_url":"https://api.github.com/users/nammonpx/repos","events_url":"https://api.github.com/users/nammonpx/events{/privacy}","received_events_url":"https://api.github.com/users/nammonpx/received_events","type":"User","site_admin":false},"repo":{"id":99091074,"name":"sample_app","full_name":"nammonpx/sample_app","owner":{"login":"nammonpx","id":30396354,"avatar_url":"https://avatars1.githubusercontent.com/u/30396354?v=4","gravatar_id":"","url":"https://api.github.com/users/nammonpx","html_url":"https://github.com/nammonpx","followers_url":"https://api.github.com/users/nammonpx/followers","following_url":"https://api.github.com/users/nammonpx/following{/other_user}","gists_url":"https://api.github.com/users/nammonpx/gists{/gist_id}","starred_url":"https://api.github.com/users/nammonpx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nammonpx/subscriptions","organizations_url":"https://api.github.com/users/nammonpx/orgs","repos_url":"https://api.github.com/users/nammonpx/repos","events_url":"https://api.github.com/users/nammonpx/events{/privacy}","received_events_url":"https://api.github.com/users/nammonpx/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nammonpx/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/nammonpx/sample_app","forks_url":"https://api.github.com/repos/nammonpx/sample_app/forks","keys_url":"https://api.github.com/repos/nammonpx/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nammonpx/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nammonpx/sample_app/teams","hooks_url":"https://api.github.com/repos/nammonpx/sample_app/hooks","issue_events_url":"https://api.github.com/repos/nammonpx/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/nammonpx/sample_app/events","assignees_url":"https://api.github.com/repos/nammonpx/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/nammonpx/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/nammonpx/sample_app/tags","blobs_url":"https://api.github.com/repos/nammonpx/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nammonpx/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nammonpx/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/nammonpx/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nammonpx/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/nammonpx/sample_app/languages","stargazers_url":"https://api.github.com/repos/nammonpx/sample_app/stargazers","contributors_url":"https://api.github.com/repos/nammonpx/sample_app/contributors","subscribers_url":"https://api.github.com/repos/nammonpx/sample_app/subscribers","subscription_url":"https://api.github.com/repos/nammonpx/sample_app/subscription","commits_url":"https://api.github.com/repos/nammonpx/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/nammonpx/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/nammonpx/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/nammonpx/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/nammonpx/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/nammonpx/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nammonpx/sample_app/merges","archive_url":"https://api.github.com/repos/nammonpx/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nammonpx/sample_app/downloads","issues_url":"https://api.github.com/repos/nammonpx/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/nammonpx/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/nammonpx/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/nammonpx/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nammonpx/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/nammonpx/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/nammonpx/sample_app/deployments","created_at":"2017-08-02T08:19:22Z","updated_at":"2017-08-02T08:57:06Z","pushed_at":"2017-08-24T08:47:44Z","git_url":"git://github.com/nammonpx/sample_app.git","ssh_url":"git@github.com:nammonpx/sample_app.git","clone_url":"https://github.com/nammonpx/sample_app.git","svn_url":"https://github.com/nammonpx/sample_app","homepage":null,"size":2267,"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,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nammonpx/sample_app/pulls/11"},"html":{"href":"https://github.com/nammonpx/sample_app/pull/11"},"issue":{"href":"https://api.github.com/repos/nammonpx/sample_app/issues/11"},"comments":{"href":"https://api.github.com/repos/nammonpx/sample_app/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/nammonpx/sample_app/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/nammonpx/sample_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nammonpx/sample_app/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/nammonpx/sample_app/statuses/1194cbd289ceec9bc019e7908598f6e43ae06d86"}}}}
{"actor":{"display_login":"huongnguyenmta"}}