{"action":"created","comment":{"url":"https://api.github.com/repos/TranTuanManh/sample_app/pulls/comments/124700079","pull_request_review_id":47014478,"id":124700079,"diff_hunk":"@@ -0,0 +1,16 @@\n+class User < ApplicationRecord\n+  VALID_EMAIL_REGEX = /\\A[\\w+\\-.]+@[a-z\\d\\-]+(\\.[a-z\\d\\-]+)*\\.[a-z]+\\z/i\n+  validates :email, format: {with: VALID_EMAIL_REGEX},\n+    presence: true,\n+    uniqueness: {case_sensitive: false},\n+    length: {maximum: 255}\n+  validates :password, presence: true, length: {minimum: 6}\n+  validates :name, presence: true, length: {maximum: 50}\n+  has_secure_password\n+  before_save{email_downcase}","path":"app/models/user.rb","position":10,"original_position":10,"commit_id":"cae108beba4b18b3591827fe1c6f0ad511d4fdba","original_commit_id":"cae108beba4b18b3591827fe1c6f0ad511d4fdba","user":{"login":"sangnuce","id":12852873,"avatar_url":"https://avatars0.githubusercontent.com/u/12852873?v=3","gravatar_id":"","url":"https://api.github.com/users/sangnuce","html_url":"https://github.com/sangnuce","followers_url":"https://api.github.com/users/sangnuce/followers","following_url":"https://api.github.com/users/sangnuce/following{/other_user}","gists_url":"https://api.github.com/users/sangnuce/gists{/gist_id}","starred_url":"https://api.github.com/users/sangnuce/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sangnuce/subscriptions","organizations_url":"https://api.github.com/users/sangnuce/orgs","repos_url":"https://api.github.com/users/sangnuce/repos","events_url":"https://api.github.com/users/sangnuce/events{/privacy}","received_events_url":"https://api.github.com/users/sangnuce/received_events","type":"User","site_admin":false},"body":"tìm hiểu lại cách dùng callback khi có sẵn hàm rồi nhé\r\n`before_save :email_downcase`","created_at":"2017-06-29T02:29:21Z","updated_at":"2017-06-29T02:29:46Z","html_url":"https://github.com/TranTuanManh/sample_app/pull/6#discussion_r124700079","pull_request_url":"https://api.github.com/repos/TranTuanManh/sample_app/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/TranTuanManh/sample_app/pulls/comments/124700079"},"html":{"href":"https://github.com/TranTuanManh/sample_app/pull/6#discussion_r124700079"},"pull_request":{"href":"https://api.github.com/repos/TranTuanManh/sample_app/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/TranTuanManh/sample_app/pulls/6","id":128052820,"html_url":"https://github.com/TranTuanManh/sample_app/pull/6","diff_url":"https://github.com/TranTuanManh/sample_app/pull/6.diff","patch_url":"https://github.com/TranTuanManh/sample_app/pull/6.patch","issue_url":"https://api.github.com/repos/TranTuanManh/sample_app/issues/6","number":6,"state":"open","locked":false,"title":"Modeling users chap6","user":{"login":"TranTuanManh","id":29418461,"avatar_url":"https://avatars3.githubusercontent.com/u/29418461?v=3","gravatar_id":"","url":"https://api.github.com/users/TranTuanManh","html_url":"https://github.com/TranTuanManh","followers_url":"https://api.github.com/users/TranTuanManh/followers","following_url":"https://api.github.com/users/TranTuanManh/following{/other_user}","gists_url":"https://api.github.com/users/TranTuanManh/gists{/gist_id}","starred_url":"https://api.github.com/users/TranTuanManh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TranTuanManh/subscriptions","organizations_url":"https://api.github.com/users/TranTuanManh/orgs","repos_url":"https://api.github.com/users/TranTuanManh/repos","events_url":"https://api.github.com/users/TranTuanManh/events{/privacy}","received_events_url":"https://api.github.com/users/TranTuanManh/received_events","type":"User","site_admin":false},"body":"![screenshot from 2017-06-26 10-22-23](https://user-images.githubusercontent.com/29418461/27667485-2db51d2e-5ca5-11e7-8827-0e825b749a58.png)\r\n","created_at":"2017-06-29T01:30:20Z","updated_at":"2017-06-29T02:29:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0416b38bd58c47a125140713cfcb76688ba2c07c","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/TranTuanManh/sample_app/pulls/6/commits","review_comments_url":"https://api.github.com/repos/TranTuanManh/sample_app/pulls/6/comments","review_comment_url":"https://api.github.com/repos/TranTuanManh/sample_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/TranTuanManh/sample_app/issues/6/comments","statuses_url":"https://api.github.com/repos/TranTuanManh/sample_app/statuses/cae108beba4b18b3591827fe1c6f0ad511d4fdba","head":{"label":"TranTuanManh:modeling-users","ref":"modeling-users","sha":"cae108beba4b18b3591827fe1c6f0ad511d4fdba","user":{"login":"TranTuanManh","id":29418461,"avatar_url":"https://avatars3.githubusercontent.com/u/29418461?v=3","gravatar_id":"","url":"https://api.github.com/users/TranTuanManh","html_url":"https://github.com/TranTuanManh","followers_url":"https://api.github.com/users/TranTuanManh/followers","following_url":"https://api.github.com/users/TranTuanManh/following{/other_user}","gists_url":"https://api.github.com/users/TranTuanManh/gists{/gist_id}","starred_url":"https://api.github.com/users/TranTuanManh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TranTuanManh/subscriptions","organizations_url":"https://api.github.com/users/TranTuanManh/orgs","repos_url":"https://api.github.com/users/TranTuanManh/repos","events_url":"https://api.github.com/users/TranTuanManh/events{/privacy}","received_events_url":"https://api.github.com/users/TranTuanManh/received_events","type":"User","site_admin":false},"repo":{"id":95401354,"name":"sample_app","full_name":"TranTuanManh/sample_app","owner":{"login":"TranTuanManh","id":29418461,"avatar_url":"https://avatars3.githubusercontent.com/u/29418461?v=3","gravatar_id":"","url":"https://api.github.com/users/TranTuanManh","html_url":"https://github.com/TranTuanManh","followers_url":"https://api.github.com/users/TranTuanManh/followers","following_url":"https://api.github.com/users/TranTuanManh/following{/other_user}","gists_url":"https://api.github.com/users/TranTuanManh/gists{/gist_id}","starred_url":"https://api.github.com/users/TranTuanManh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TranTuanManh/subscriptions","organizations_url":"https://api.github.com/users/TranTuanManh/orgs","repos_url":"https://api.github.com/users/TranTuanManh/repos","events_url":"https://api.github.com/users/TranTuanManh/events{/privacy}","received_events_url":"https://api.github.com/users/TranTuanManh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TranTuanManh/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/TranTuanManh/sample_app","forks_url":"https://api.github.com/repos/TranTuanManh/sample_app/forks","keys_url":"https://api.github.com/repos/TranTuanManh/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TranTuanManh/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TranTuanManh/sample_app/teams","hooks_url":"https://api.github.com/repos/TranTuanManh/sample_app/hooks","issue_events_url":"https://api.github.com/repos/TranTuanManh/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/TranTuanManh/sample_app/events","assignees_url":"https://api.github.com/repos/TranTuanManh/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/TranTuanManh/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/TranTuanManh/sample_app/tags","blobs_url":"https://api.github.com/repos/TranTuanManh/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TranTuanManh/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TranTuanManh/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/TranTuanManh/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TranTuanManh/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/TranTuanManh/sample_app/languages","stargazers_url":"https://api.github.com/repos/TranTuanManh/sample_app/stargazers","contributors_url":"https://api.github.com/repos/TranTuanManh/sample_app/contributors","subscribers_url":"https://api.github.com/repos/TranTuanManh/sample_app/subscribers","subscription_url":"https://api.github.com/repos/TranTuanManh/sample_app/subscription","commits_url":"https://api.github.com/repos/TranTuanManh/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/TranTuanManh/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/TranTuanManh/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/TranTuanManh/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/TranTuanManh/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/TranTuanManh/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TranTuanManh/sample_app/merges","archive_url":"https://api.github.com/repos/TranTuanManh/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TranTuanManh/sample_app/downloads","issues_url":"https://api.github.com/repos/TranTuanManh/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/TranTuanManh/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/TranTuanManh/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/TranTuanManh/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TranTuanManh/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/TranTuanManh/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/TranTuanManh/sample_app/deployments","created_at":"2017-06-26T02:40:18Z","updated_at":"2017-06-26T02:40:18Z","pushed_at":"2017-06-29T02:20:12Z","git_url":"git://github.com/TranTuanManh/sample_app.git","ssh_url":"git@github.com:TranTuanManh/sample_app.git","clone_url":"https://github.com/TranTuanManh/sample_app.git","svn_url":"https://github.com/TranTuanManh/sample_app","homepage":null,"size":191,"stargazers_count":0,"watchers_count":0,"language":null,"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":"TranTuanManh:develop","ref":"develop","sha":"7b8881dc4b3977a7fae5280dd203760e9ef1763d","user":{"login":"TranTuanManh","id":29418461,"avatar_url":"https://avatars3.githubusercontent.com/u/29418461?v=3","gravatar_id":"","url":"https://api.github.com/users/TranTuanManh","html_url":"https://github.com/TranTuanManh","followers_url":"https://api.github.com/users/TranTuanManh/followers","following_url":"https://api.github.com/users/TranTuanManh/following{/other_user}","gists_url":"https://api.github.com/users/TranTuanManh/gists{/gist_id}","starred_url":"https://api.github.com/users/TranTuanManh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TranTuanManh/subscriptions","organizations_url":"https://api.github.com/users/TranTuanManh/orgs","repos_url":"https://api.github.com/users/TranTuanManh/repos","events_url":"https://api.github.com/users/TranTuanManh/events{/privacy}","received_events_url":"https://api.github.com/users/TranTuanManh/received_events","type":"User","site_admin":false},"repo":{"id":95401354,"name":"sample_app","full_name":"TranTuanManh/sample_app","owner":{"login":"TranTuanManh","id":29418461,"avatar_url":"https://avatars3.githubusercontent.com/u/29418461?v=3","gravatar_id":"","url":"https://api.github.com/users/TranTuanManh","html_url":"https://github.com/TranTuanManh","followers_url":"https://api.github.com/users/TranTuanManh/followers","following_url":"https://api.github.com/users/TranTuanManh/following{/other_user}","gists_url":"https://api.github.com/users/TranTuanManh/gists{/gist_id}","starred_url":"https://api.github.com/users/TranTuanManh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TranTuanManh/subscriptions","organizations_url":"https://api.github.com/users/TranTuanManh/orgs","repos_url":"https://api.github.com/users/TranTuanManh/repos","events_url":"https://api.github.com/users/TranTuanManh/events{/privacy}","received_events_url":"https://api.github.com/users/TranTuanManh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TranTuanManh/sample_app","description":null,"fork":false,"url":"https://api.github.com/repos/TranTuanManh/sample_app","forks_url":"https://api.github.com/repos/TranTuanManh/sample_app/forks","keys_url":"https://api.github.com/repos/TranTuanManh/sample_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TranTuanManh/sample_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TranTuanManh/sample_app/teams","hooks_url":"https://api.github.com/repos/TranTuanManh/sample_app/hooks","issue_events_url":"https://api.github.com/repos/TranTuanManh/sample_app/issues/events{/number}","events_url":"https://api.github.com/repos/TranTuanManh/sample_app/events","assignees_url":"https://api.github.com/repos/TranTuanManh/sample_app/assignees{/user}","branches_url":"https://api.github.com/repos/TranTuanManh/sample_app/branches{/branch}","tags_url":"https://api.github.com/repos/TranTuanManh/sample_app/tags","blobs_url":"https://api.github.com/repos/TranTuanManh/sample_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TranTuanManh/sample_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TranTuanManh/sample_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/TranTuanManh/sample_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TranTuanManh/sample_app/statuses/{sha}","languages_url":"https://api.github.com/repos/TranTuanManh/sample_app/languages","stargazers_url":"https://api.github.com/repos/TranTuanManh/sample_app/stargazers","contributors_url":"https://api.github.com/repos/TranTuanManh/sample_app/contributors","subscribers_url":"https://api.github.com/repos/TranTuanManh/sample_app/subscribers","subscription_url":"https://api.github.com/repos/TranTuanManh/sample_app/subscription","commits_url":"https://api.github.com/repos/TranTuanManh/sample_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/TranTuanManh/sample_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/TranTuanManh/sample_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/TranTuanManh/sample_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/TranTuanManh/sample_app/contents/{+path}","compare_url":"https://api.github.com/repos/TranTuanManh/sample_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TranTuanManh/sample_app/merges","archive_url":"https://api.github.com/repos/TranTuanManh/sample_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TranTuanManh/sample_app/downloads","issues_url":"https://api.github.com/repos/TranTuanManh/sample_app/issues{/number}","pulls_url":"https://api.github.com/repos/TranTuanManh/sample_app/pulls{/number}","milestones_url":"https://api.github.com/repos/TranTuanManh/sample_app/milestones{/number}","notifications_url":"https://api.github.com/repos/TranTuanManh/sample_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TranTuanManh/sample_app/labels{/name}","releases_url":"https://api.github.com/repos/TranTuanManh/sample_app/releases{/id}","deployments_url":"https://api.github.com/repos/TranTuanManh/sample_app/deployments","created_at":"2017-06-26T02:40:18Z","updated_at":"2017-06-26T02:40:18Z","pushed_at":"2017-06-29T02:20:12Z","git_url":"git://github.com/TranTuanManh/sample_app.git","ssh_url":"git@github.com:TranTuanManh/sample_app.git","clone_url":"https://github.com/TranTuanManh/sample_app.git","svn_url":"https://github.com/TranTuanManh/sample_app","homepage":null,"size":191,"stargazers_count":0,"watchers_count":0,"language":null,"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/TranTuanManh/sample_app/pulls/6"},"html":{"href":"https://github.com/TranTuanManh/sample_app/pull/6"},"issue":{"href":"https://api.github.com/repos/TranTuanManh/sample_app/issues/6"},"comments":{"href":"https://api.github.com/repos/TranTuanManh/sample_app/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/TranTuanManh/sample_app/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/TranTuanManh/sample_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/TranTuanManh/sample_app/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/TranTuanManh/sample_app/statuses/cae108beba4b18b3591827fe1c6f0ad511d4fdba"}}}}
{"actor":{"display_login":"sangnuce"}}