{"action":"created","comment":{"url":"https://api.github.com/repos/ruoshuigao/myflix/pulls/comments/23017271","id":23017271,"diff_hunk":"@@ -0,0 +1,20 @@\n+class User < ActiveRecord::Base\n+  VALID_EMAIL_REGEX = /\\A[\\w+\\-.]+@[a-z\\d\\-.]+\\.[a-z]+\\z/i\n+\n+  has_secure_password validation: false\n+\n+  validates :email,            presence: true,\n+                               format: { with: VALID_EMAIL_REGEX },\n+                               uniqueness: { case_sensitive: false }\n+  validates :password,         presence: true, length: { in: 6..20 }, on: :create\n+  validates :full_name,        presence: true, length: { in: 3..20 }\n+  validates :security_code,    presence: true, if: :credit_card_number_presence\n+  validates :expiration_month, presence: true, if: :credit_card_number_presence","path":"app/models/user.rb","position":12,"original_position":12,"commit_id":"16b49b44a4cb0dbfa712132ca15be2a89622931e","original_commit_id":"16b49b44a4cb0dbfa712132ca15be2a89622931e","user":{"login":"alagram","id":3409684,"avatar_url":"https://avatars.githubusercontent.com/u/3409684?v=3","gravatar_id":"","url":"https://api.github.com/users/alagram","html_url":"https://github.com/alagram","followers_url":"https://api.github.com/users/alagram/followers","following_url":"https://api.github.com/users/alagram/following{/other_user}","gists_url":"https://api.github.com/users/alagram/gists{/gist_id}","starred_url":"https://api.github.com/users/alagram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alagram/subscriptions","organizations_url":"https://api.github.com/users/alagram/orgs","repos_url":"https://api.github.com/users/alagram/repos","events_url":"https://api.github.com/users/alagram/events{/privacy}","received_events_url":"https://api.github.com/users/alagram/received_events","type":"User","site_admin":false},"body":"Same here","created_at":"2015-01-15T15:34:43Z","updated_at":"2015-01-15T15:34:43Z","html_url":"https://github.com/ruoshuigao/myflix/pull/2#discussion_r23017271","pull_request_url":"https://api.github.com/repos/ruoshuigao/myflix/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/ruoshuigao/myflix/pulls/comments/23017271"},"html":{"href":"https://github.com/ruoshuigao/myflix/pull/2#discussion_r23017271"},"pull_request":{"href":"https://api.github.com/repos/ruoshuigao/myflix/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/ruoshuigao/myflix/pulls/2","id":27433683,"html_url":"https://github.com/ruoshuigao/myflix/pull/2","diff_url":"https://github.com/ruoshuigao/myflix/pull/2.diff","patch_url":"https://github.com/ruoshuigao/myflix/pull/2.patch","issue_url":"https://api.github.com/repos/ruoshuigao/myflix/issues/2","number":2,"state":"open","locked":false,"title":"Tdd to finished video, user and authentication","user":{"login":"ruoshuigao","id":4215820,"avatar_url":"https://avatars.githubusercontent.com/u/4215820?v=3","gravatar_id":"","url":"https://api.github.com/users/ruoshuigao","html_url":"https://github.com/ruoshuigao","followers_url":"https://api.github.com/users/ruoshuigao/followers","following_url":"https://api.github.com/users/ruoshuigao/following{/other_user}","gists_url":"https://api.github.com/users/ruoshuigao/gists{/gist_id}","starred_url":"https://api.github.com/users/ruoshuigao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruoshuigao/subscriptions","organizations_url":"https://api.github.com/users/ruoshuigao/orgs","repos_url":"https://api.github.com/users/ruoshuigao/repos","events_url":"https://api.github.com/users/ruoshuigao/events{/privacy}","received_events_url":"https://api.github.com/users/ruoshuigao/received_events","type":"User","site_admin":false},"body":"Tdd to finished video, user and authentication","created_at":"2015-01-15T14:56:36Z","updated_at":"2015-01-15T15:34:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ruoshuigao/myflix/pulls/2/commits","review_comments_url":"https://api.github.com/repos/ruoshuigao/myflix/pulls/2/comments","review_comment_url":"https://api.github.com/repos/ruoshuigao/myflix/pulls/comments/{number}","comments_url":"https://api.github.com/repos/ruoshuigao/myflix/issues/2/comments","statuses_url":"https://api.github.com/repos/ruoshuigao/myflix/statuses/16b49b44a4cb0dbfa712132ca15be2a89622931e","head":{"label":"ruoshuigao:tdd","ref":"tdd","sha":"16b49b44a4cb0dbfa712132ca15be2a89622931e","user":{"login":"ruoshuigao","id":4215820,"avatar_url":"https://avatars.githubusercontent.com/u/4215820?v=3","gravatar_id":"","url":"https://api.github.com/users/ruoshuigao","html_url":"https://github.com/ruoshuigao","followers_url":"https://api.github.com/users/ruoshuigao/followers","following_url":"https://api.github.com/users/ruoshuigao/following{/other_user}","gists_url":"https://api.github.com/users/ruoshuigao/gists{/gist_id}","starred_url":"https://api.github.com/users/ruoshuigao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruoshuigao/subscriptions","organizations_url":"https://api.github.com/users/ruoshuigao/orgs","repos_url":"https://api.github.com/users/ruoshuigao/repos","events_url":"https://api.github.com/users/ruoshuigao/events{/privacy}","received_events_url":"https://api.github.com/users/ruoshuigao/received_events","type":"User","site_admin":false},"repo":{"id":29082856,"name":"myflix","full_name":"ruoshuigao/myflix","owner":{"login":"ruoshuigao","id":4215820,"avatar_url":"https://avatars.githubusercontent.com/u/4215820?v=3","gravatar_id":"","url":"https://api.github.com/users/ruoshuigao","html_url":"https://github.com/ruoshuigao","followers_url":"https://api.github.com/users/ruoshuigao/followers","following_url":"https://api.github.com/users/ruoshuigao/following{/other_user}","gists_url":"https://api.github.com/users/ruoshuigao/gists{/gist_id}","starred_url":"https://api.github.com/users/ruoshuigao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruoshuigao/subscriptions","organizations_url":"https://api.github.com/users/ruoshuigao/orgs","repos_url":"https://api.github.com/users/ruoshuigao/repos","events_url":"https://api.github.com/users/ruoshuigao/events{/privacy}","received_events_url":"https://api.github.com/users/ruoshuigao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ruoshuigao/myflix","description":"myflix","fork":false,"url":"https://api.github.com/repos/ruoshuigao/myflix","forks_url":"https://api.github.com/repos/ruoshuigao/myflix/forks","keys_url":"https://api.github.com/repos/ruoshuigao/myflix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ruoshuigao/myflix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ruoshuigao/myflix/teams","hooks_url":"https://api.github.com/repos/ruoshuigao/myflix/hooks","issue_events_url":"https://api.github.com/repos/ruoshuigao/myflix/issues/events{/number}","events_url":"https://api.github.com/repos/ruoshuigao/myflix/events","assignees_url":"https://api.github.com/repos/ruoshuigao/myflix/assignees{/user}","branches_url":"https://api.github.com/repos/ruoshuigao/myflix/branches{/branch}","tags_url":"https://api.github.com/repos/ruoshuigao/myflix/tags","blobs_url":"https://api.github.com/repos/ruoshuigao/myflix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ruoshuigao/myflix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ruoshuigao/myflix/git/refs{/sha}","trees_url":"https://api.github.com/repos/ruoshuigao/myflix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ruoshuigao/myflix/statuses/{sha}","languages_url":"https://api.github.com/repos/ruoshuigao/myflix/languages","stargazers_url":"https://api.github.com/repos/ruoshuigao/myflix/stargazers","contributors_url":"https://api.github.com/repos/ruoshuigao/myflix/contributors","subscribers_url":"https://api.github.com/repos/ruoshuigao/myflix/subscribers","subscription_url":"https://api.github.com/repos/ruoshuigao/myflix/subscription","commits_url":"https://api.github.com/repos/ruoshuigao/myflix/commits{/sha}","git_commits_url":"https://api.github.com/repos/ruoshuigao/myflix/git/commits{/sha}","comments_url":"https://api.github.com/repos/ruoshuigao/myflix/comments{/number}","issue_comment_url":"https://api.github.com/repos/ruoshuigao/myflix/issues/comments/{number}","contents_url":"https://api.github.com/repos/ruoshuigao/myflix/contents/{+path}","compare_url":"https://api.github.com/repos/ruoshuigao/myflix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ruoshuigao/myflix/merges","archive_url":"https://api.github.com/repos/ruoshuigao/myflix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ruoshuigao/myflix/downloads","issues_url":"https://api.github.com/repos/ruoshuigao/myflix/issues{/number}","pulls_url":"https://api.github.com/repos/ruoshuigao/myflix/pulls{/number}","milestones_url":"https://api.github.com/repos/ruoshuigao/myflix/milestones{/number}","notifications_url":"https://api.github.com/repos/ruoshuigao/myflix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ruoshuigao/myflix/labels{/name}","releases_url":"https://api.github.com/repos/ruoshuigao/myflix/releases{/id}","created_at":"2015-01-11T05:52:04Z","updated_at":"2015-01-15T14:54:15Z","pushed_at":"2015-01-15T14:55:40Z","git_url":"git://github.com/ruoshuigao/myflix.git","ssh_url":"git@github.com:ruoshuigao/myflix.git","clone_url":"https://github.com/ruoshuigao/myflix.git","svn_url":"https://github.com/ruoshuigao/myflix","homepage":null,"size":0,"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":"ruoshuigao:master","ref":"master","sha":"a92c7e59218162d790b8d147a0c0808483aa2e60","user":{"login":"ruoshuigao","id":4215820,"avatar_url":"https://avatars.githubusercontent.com/u/4215820?v=3","gravatar_id":"","url":"https://api.github.com/users/ruoshuigao","html_url":"https://github.com/ruoshuigao","followers_url":"https://api.github.com/users/ruoshuigao/followers","following_url":"https://api.github.com/users/ruoshuigao/following{/other_user}","gists_url":"https://api.github.com/users/ruoshuigao/gists{/gist_id}","starred_url":"https://api.github.com/users/ruoshuigao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruoshuigao/subscriptions","organizations_url":"https://api.github.com/users/ruoshuigao/orgs","repos_url":"https://api.github.com/users/ruoshuigao/repos","events_url":"https://api.github.com/users/ruoshuigao/events{/privacy}","received_events_url":"https://api.github.com/users/ruoshuigao/received_events","type":"User","site_admin":false},"repo":{"id":29082856,"name":"myflix","full_name":"ruoshuigao/myflix","owner":{"login":"ruoshuigao","id":4215820,"avatar_url":"https://avatars.githubusercontent.com/u/4215820?v=3","gravatar_id":"","url":"https://api.github.com/users/ruoshuigao","html_url":"https://github.com/ruoshuigao","followers_url":"https://api.github.com/users/ruoshuigao/followers","following_url":"https://api.github.com/users/ruoshuigao/following{/other_user}","gists_url":"https://api.github.com/users/ruoshuigao/gists{/gist_id}","starred_url":"https://api.github.com/users/ruoshuigao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruoshuigao/subscriptions","organizations_url":"https://api.github.com/users/ruoshuigao/orgs","repos_url":"https://api.github.com/users/ruoshuigao/repos","events_url":"https://api.github.com/users/ruoshuigao/events{/privacy}","received_events_url":"https://api.github.com/users/ruoshuigao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ruoshuigao/myflix","description":"myflix","fork":false,"url":"https://api.github.com/repos/ruoshuigao/myflix","forks_url":"https://api.github.com/repos/ruoshuigao/myflix/forks","keys_url":"https://api.github.com/repos/ruoshuigao/myflix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ruoshuigao/myflix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ruoshuigao/myflix/teams","hooks_url":"https://api.github.com/repos/ruoshuigao/myflix/hooks","issue_events_url":"https://api.github.com/repos/ruoshuigao/myflix/issues/events{/number}","events_url":"https://api.github.com/repos/ruoshuigao/myflix/events","assignees_url":"https://api.github.com/repos/ruoshuigao/myflix/assignees{/user}","branches_url":"https://api.github.com/repos/ruoshuigao/myflix/branches{/branch}","tags_url":"https://api.github.com/repos/ruoshuigao/myflix/tags","blobs_url":"https://api.github.com/repos/ruoshuigao/myflix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ruoshuigao/myflix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ruoshuigao/myflix/git/refs{/sha}","trees_url":"https://api.github.com/repos/ruoshuigao/myflix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ruoshuigao/myflix/statuses/{sha}","languages_url":"https://api.github.com/repos/ruoshuigao/myflix/languages","stargazers_url":"https://api.github.com/repos/ruoshuigao/myflix/stargazers","contributors_url":"https://api.github.com/repos/ruoshuigao/myflix/contributors","subscribers_url":"https://api.github.com/repos/ruoshuigao/myflix/subscribers","subscription_url":"https://api.github.com/repos/ruoshuigao/myflix/subscription","commits_url":"https://api.github.com/repos/ruoshuigao/myflix/commits{/sha}","git_commits_url":"https://api.github.com/repos/ruoshuigao/myflix/git/commits{/sha}","comments_url":"https://api.github.com/repos/ruoshuigao/myflix/comments{/number}","issue_comment_url":"https://api.github.com/repos/ruoshuigao/myflix/issues/comments/{number}","contents_url":"https://api.github.com/repos/ruoshuigao/myflix/contents/{+path}","compare_url":"https://api.github.com/repos/ruoshuigao/myflix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ruoshuigao/myflix/merges","archive_url":"https://api.github.com/repos/ruoshuigao/myflix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ruoshuigao/myflix/downloads","issues_url":"https://api.github.com/repos/ruoshuigao/myflix/issues{/number}","pulls_url":"https://api.github.com/repos/ruoshuigao/myflix/pulls{/number}","milestones_url":"https://api.github.com/repos/ruoshuigao/myflix/milestones{/number}","notifications_url":"https://api.github.com/repos/ruoshuigao/myflix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ruoshuigao/myflix/labels{/name}","releases_url":"https://api.github.com/repos/ruoshuigao/myflix/releases{/id}","created_at":"2015-01-11T05:52:04Z","updated_at":"2015-01-15T14:54:15Z","pushed_at":"2015-01-15T14:55:40Z","git_url":"git://github.com/ruoshuigao/myflix.git","ssh_url":"git@github.com:ruoshuigao/myflix.git","clone_url":"https://github.com/ruoshuigao/myflix.git","svn_url":"https://github.com/ruoshuigao/myflix","homepage":null,"size":0,"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/ruoshuigao/myflix/pulls/2"},"html":{"href":"https://github.com/ruoshuigao/myflix/pull/2"},"issue":{"href":"https://api.github.com/repos/ruoshuigao/myflix/issues/2"},"comments":{"href":"https://api.github.com/repos/ruoshuigao/myflix/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/ruoshuigao/myflix/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/ruoshuigao/myflix/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/ruoshuigao/myflix/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/ruoshuigao/myflix/statuses/16b49b44a4cb0dbfa712132ca15be2a89622931e"}}}}