{"action":"created","comment":{"url":"https://api.github.com/repos/kcny/myflix/pulls/comments/27210160","id":27210160,"diff_hunk":"@@ -0,0 +1,16 @@\n+class ForgotPasswordsController < ApplicationController\n+\n+  def create\n+    user = User.where(email: params[:email]).first\n+    if user\n+      AppMailer.send_forgot_password(user).deliver\n+      redirect_to forgot_password_confirmation_path\n+    else\n+      flash[:error] = params[:email].blank? ? \"Email cannot be blank.\" : \"User email does not exist.\"\n+      redirect_to forgot_password_path\n+    end\n+  end\n+\n+  def confirm","path":"app/controllers/forgot_passwords_controller.rb","position":14,"original_position":14,"commit_id":"7ba4744469549d8fbc163f11feaed696e36a8b47","original_commit_id":"7ba4744469549d8fbc163f11feaed696e36a8b47","user":{"login":"tomtomecek","id":7385469,"avatar_url":"https://avatars.githubusercontent.com/u/7385469?v=3","gravatar_id":"","url":"https://api.github.com/users/tomtomecek","html_url":"https://github.com/tomtomecek","followers_url":"https://api.github.com/users/tomtomecek/followers","following_url":"https://api.github.com/users/tomtomecek/following{/other_user}","gists_url":"https://api.github.com/users/tomtomecek/gists{/gist_id}","starred_url":"https://api.github.com/users/tomtomecek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomtomecek/subscriptions","organizations_url":"https://api.github.com/users/tomtomecek/orgs","repos_url":"https://api.github.com/users/tomtomecek/repos","events_url":"https://api.github.com/users/tomtomecek/events{/privacy}","received_events_url":"https://api.github.com/users/tomtomecek/received_events","type":"User","site_admin":false},"body":"I would suggest to use `def confirm; end` or just do not use it. But the former looks better :).","created_at":"2015-03-26T13:06:27Z","updated_at":"2015-03-26T13:06:27Z","html_url":"https://github.com/kcny/myflix/pull/9#discussion_r27210160","pull_request_url":"https://api.github.com/repos/kcny/myflix/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/kcny/myflix/pulls/comments/27210160"},"html":{"href":"https://github.com/kcny/myflix/pull/9#discussion_r27210160"},"pull_request":{"href":"https://api.github.com/repos/kcny/myflix/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/kcny/myflix/pulls/9","id":32013380,"html_url":"https://github.com/kcny/myflix/pull/9","diff_url":"https://github.com/kcny/myflix/pull/9.diff","patch_url":"https://github.com/kcny/myflix/pull/9.patch","issue_url":"https://api.github.com/repos/kcny/myflix/issues/9","number":9,"state":"open","locked":false,"title":"Mod3","user":{"login":"kcny","id":5713219,"avatar_url":"https://avatars.githubusercontent.com/u/5713219?v=3","gravatar_id":"","url":"https://api.github.com/users/kcny","html_url":"https://github.com/kcny","followers_url":"https://api.github.com/users/kcny/followers","following_url":"https://api.github.com/users/kcny/following{/other_user}","gists_url":"https://api.github.com/users/kcny/gists{/gist_id}","starred_url":"https://api.github.com/users/kcny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcny/subscriptions","organizations_url":"https://api.github.com/users/kcny/orgs","repos_url":"https://api.github.com/users/kcny/repos","events_url":"https://api.github.com/users/kcny/events{/privacy}","received_events_url":"https://api.github.com/users/kcny/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-03-26T12:38:48Z","updated_at":"2015-03-26T13:06:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4fe3f7239eea0e2616c4e4d26d0e996ff1f89f49","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kcny/myflix/pulls/9/commits","review_comments_url":"https://api.github.com/repos/kcny/myflix/pulls/9/comments","review_comment_url":"https://api.github.com/repos/kcny/myflix/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kcny/myflix/issues/9/comments","statuses_url":"https://api.github.com/repos/kcny/myflix/statuses/7ba4744469549d8fbc163f11feaed696e36a8b47","head":{"label":"kcny:mod3","ref":"mod3","sha":"7ba4744469549d8fbc163f11feaed696e36a8b47","user":{"login":"kcny","id":5713219,"avatar_url":"https://avatars.githubusercontent.com/u/5713219?v=3","gravatar_id":"","url":"https://api.github.com/users/kcny","html_url":"https://github.com/kcny","followers_url":"https://api.github.com/users/kcny/followers","following_url":"https://api.github.com/users/kcny/following{/other_user}","gists_url":"https://api.github.com/users/kcny/gists{/gist_id}","starred_url":"https://api.github.com/users/kcny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcny/subscriptions","organizations_url":"https://api.github.com/users/kcny/orgs","repos_url":"https://api.github.com/users/kcny/repos","events_url":"https://api.github.com/users/kcny/events{/privacy}","received_events_url":"https://api.github.com/users/kcny/received_events","type":"User","site_admin":false},"repo":{"id":30129140,"name":"myflix","full_name":"kcny/myflix","owner":{"login":"kcny","id":5713219,"avatar_url":"https://avatars.githubusercontent.com/u/5713219?v=3","gravatar_id":"","url":"https://api.github.com/users/kcny","html_url":"https://github.com/kcny","followers_url":"https://api.github.com/users/kcny/followers","following_url":"https://api.github.com/users/kcny/following{/other_user}","gists_url":"https://api.github.com/users/kcny/gists{/gist_id}","starred_url":"https://api.github.com/users/kcny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcny/subscriptions","organizations_url":"https://api.github.com/users/kcny/orgs","repos_url":"https://api.github.com/users/kcny/repos","events_url":"https://api.github.com/users/kcny/events{/privacy}","received_events_url":"https://api.github.com/users/kcny/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kcny/myflix","description":"Build Robust and Production Quality Applications","fork":false,"url":"https://api.github.com/repos/kcny/myflix","forks_url":"https://api.github.com/repos/kcny/myflix/forks","keys_url":"https://api.github.com/repos/kcny/myflix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kcny/myflix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kcny/myflix/teams","hooks_url":"https://api.github.com/repos/kcny/myflix/hooks","issue_events_url":"https://api.github.com/repos/kcny/myflix/issues/events{/number}","events_url":"https://api.github.com/repos/kcny/myflix/events","assignees_url":"https://api.github.com/repos/kcny/myflix/assignees{/user}","branches_url":"https://api.github.com/repos/kcny/myflix/branches{/branch}","tags_url":"https://api.github.com/repos/kcny/myflix/tags","blobs_url":"https://api.github.com/repos/kcny/myflix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kcny/myflix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kcny/myflix/git/refs{/sha}","trees_url":"https://api.github.com/repos/kcny/myflix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kcny/myflix/statuses/{sha}","languages_url":"https://api.github.com/repos/kcny/myflix/languages","stargazers_url":"https://api.github.com/repos/kcny/myflix/stargazers","contributors_url":"https://api.github.com/repos/kcny/myflix/contributors","subscribers_url":"https://api.github.com/repos/kcny/myflix/subscribers","subscription_url":"https://api.github.com/repos/kcny/myflix/subscription","commits_url":"https://api.github.com/repos/kcny/myflix/commits{/sha}","git_commits_url":"https://api.github.com/repos/kcny/myflix/git/commits{/sha}","comments_url":"https://api.github.com/repos/kcny/myflix/comments{/number}","issue_comment_url":"https://api.github.com/repos/kcny/myflix/issues/comments{/number}","contents_url":"https://api.github.com/repos/kcny/myflix/contents/{+path}","compare_url":"https://api.github.com/repos/kcny/myflix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kcny/myflix/merges","archive_url":"https://api.github.com/repos/kcny/myflix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kcny/myflix/downloads","issues_url":"https://api.github.com/repos/kcny/myflix/issues{/number}","pulls_url":"https://api.github.com/repos/kcny/myflix/pulls{/number}","milestones_url":"https://api.github.com/repos/kcny/myflix/milestones{/number}","notifications_url":"https://api.github.com/repos/kcny/myflix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kcny/myflix/labels{/name}","releases_url":"https://api.github.com/repos/kcny/myflix/releases{/id}","created_at":"2015-01-31T22:47:38Z","updated_at":"2015-03-25T12:54:51Z","pushed_at":"2015-03-26T12:38:49Z","git_url":"git://github.com/kcny/myflix.git","ssh_url":"git@github.com:kcny/myflix.git","clone_url":"https://github.com/kcny/myflix.git","svn_url":"https://github.com/kcny/myflix","homepage":null,"size":1104,"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":"kcny:master","ref":"master","sha":"ae5176b6df979e39cc239b8316c470b8b57e68c2","user":{"login":"kcny","id":5713219,"avatar_url":"https://avatars.githubusercontent.com/u/5713219?v=3","gravatar_id":"","url":"https://api.github.com/users/kcny","html_url":"https://github.com/kcny","followers_url":"https://api.github.com/users/kcny/followers","following_url":"https://api.github.com/users/kcny/following{/other_user}","gists_url":"https://api.github.com/users/kcny/gists{/gist_id}","starred_url":"https://api.github.com/users/kcny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcny/subscriptions","organizations_url":"https://api.github.com/users/kcny/orgs","repos_url":"https://api.github.com/users/kcny/repos","events_url":"https://api.github.com/users/kcny/events{/privacy}","received_events_url":"https://api.github.com/users/kcny/received_events","type":"User","site_admin":false},"repo":{"id":30129140,"name":"myflix","full_name":"kcny/myflix","owner":{"login":"kcny","id":5713219,"avatar_url":"https://avatars.githubusercontent.com/u/5713219?v=3","gravatar_id":"","url":"https://api.github.com/users/kcny","html_url":"https://github.com/kcny","followers_url":"https://api.github.com/users/kcny/followers","following_url":"https://api.github.com/users/kcny/following{/other_user}","gists_url":"https://api.github.com/users/kcny/gists{/gist_id}","starred_url":"https://api.github.com/users/kcny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcny/subscriptions","organizations_url":"https://api.github.com/users/kcny/orgs","repos_url":"https://api.github.com/users/kcny/repos","events_url":"https://api.github.com/users/kcny/events{/privacy}","received_events_url":"https://api.github.com/users/kcny/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kcny/myflix","description":"Build Robust and Production Quality Applications","fork":false,"url":"https://api.github.com/repos/kcny/myflix","forks_url":"https://api.github.com/repos/kcny/myflix/forks","keys_url":"https://api.github.com/repos/kcny/myflix/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kcny/myflix/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kcny/myflix/teams","hooks_url":"https://api.github.com/repos/kcny/myflix/hooks","issue_events_url":"https://api.github.com/repos/kcny/myflix/issues/events{/number}","events_url":"https://api.github.com/repos/kcny/myflix/events","assignees_url":"https://api.github.com/repos/kcny/myflix/assignees{/user}","branches_url":"https://api.github.com/repos/kcny/myflix/branches{/branch}","tags_url":"https://api.github.com/repos/kcny/myflix/tags","blobs_url":"https://api.github.com/repos/kcny/myflix/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kcny/myflix/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kcny/myflix/git/refs{/sha}","trees_url":"https://api.github.com/repos/kcny/myflix/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kcny/myflix/statuses/{sha}","languages_url":"https://api.github.com/repos/kcny/myflix/languages","stargazers_url":"https://api.github.com/repos/kcny/myflix/stargazers","contributors_url":"https://api.github.com/repos/kcny/myflix/contributors","subscribers_url":"https://api.github.com/repos/kcny/myflix/subscribers","subscription_url":"https://api.github.com/repos/kcny/myflix/subscription","commits_url":"https://api.github.com/repos/kcny/myflix/commits{/sha}","git_commits_url":"https://api.github.com/repos/kcny/myflix/git/commits{/sha}","comments_url":"https://api.github.com/repos/kcny/myflix/comments{/number}","issue_comment_url":"https://api.github.com/repos/kcny/myflix/issues/comments{/number}","contents_url":"https://api.github.com/repos/kcny/myflix/contents/{+path}","compare_url":"https://api.github.com/repos/kcny/myflix/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kcny/myflix/merges","archive_url":"https://api.github.com/repos/kcny/myflix/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kcny/myflix/downloads","issues_url":"https://api.github.com/repos/kcny/myflix/issues{/number}","pulls_url":"https://api.github.com/repos/kcny/myflix/pulls{/number}","milestones_url":"https://api.github.com/repos/kcny/myflix/milestones{/number}","notifications_url":"https://api.github.com/repos/kcny/myflix/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kcny/myflix/labels{/name}","releases_url":"https://api.github.com/repos/kcny/myflix/releases{/id}","created_at":"2015-01-31T22:47:38Z","updated_at":"2015-03-25T12:54:51Z","pushed_at":"2015-03-26T12:38:49Z","git_url":"git://github.com/kcny/myflix.git","ssh_url":"git@github.com:kcny/myflix.git","clone_url":"https://github.com/kcny/myflix.git","svn_url":"https://github.com/kcny/myflix","homepage":null,"size":1104,"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/kcny/myflix/pulls/9"},"html":{"href":"https://github.com/kcny/myflix/pull/9"},"issue":{"href":"https://api.github.com/repos/kcny/myflix/issues/9"},"comments":{"href":"https://api.github.com/repos/kcny/myflix/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/kcny/myflix/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/kcny/myflix/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kcny/myflix/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/kcny/myflix/statuses/7ba4744469549d8fbc163f11feaed696e36a8b47"}}}}