{"action":"created","comment":{"url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/pulls/comments/44478435","id":44478435,"diff_hunk":"@@ -1,5 +1,13 @@\n class ApplicationController < ActionController::Base\n-  # Prevent CSRF attacks by raising an exception.\n-  # For APIs, you may want to use :null_session instead.\n   protect_from_forgery with: :exception\n+  helper_method :logged_in?, :current_user\n+\n+  def logged_in?\n+    !!current_user\n+  end\n+\n+  def current_user\n+    @user ||= User.find_by(id: session[:user_id]) if session[:user_id]","path":"app/controllers/application_controller.rb","position":12,"original_position":12,"commit_id":"7a9eac6af215153c7aa447cb84d6f053fd16faf0","original_commit_id":"7a9eac6af215153c7aa447cb84d6f053fd16faf0","user":{"login":"sgharms","id":50019,"avatar_url":"https://avatars.githubusercontent.com/u/50019?v=3","gravatar_id":"","url":"https://api.github.com/users/sgharms","html_url":"https://github.com/sgharms","followers_url":"https://api.github.com/users/sgharms/followers","following_url":"https://api.github.com/users/sgharms/following{/other_user}","gists_url":"https://api.github.com/users/sgharms/gists{/gist_id}","starred_url":"https://api.github.com/users/sgharms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgharms/subscriptions","organizations_url":"https://api.github.com/users/sgharms/orgs","repos_url":"https://api.github.com/users/sgharms/repos","events_url":"https://api.github.com/users/sgharms/events{/privacy}","received_events_url":"https://api.github.com/users/sgharms/received_events","type":"User","site_admin":false},"body":"Is this `if` required?  What if find_by doesn't find its target?\r\n","created_at":"2015-11-10T22:52:45Z","updated_at":"2015-11-10T22:52:45Z","html_url":"https://github.com/nyc-purple-martins-2015/r-bulletin-challenge/pull/5#discussion_r44478435","pull_request_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/pulls/comments/44478435"},"html":{"href":"https://github.com/nyc-purple-martins-2015/r-bulletin-challenge/pull/5#discussion_r44478435"},"pull_request":{"href":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/pulls/5","id":50198944,"html_url":"https://github.com/nyc-purple-martins-2015/r-bulletin-challenge/pull/5","diff_url":"https://github.com/nyc-purple-martins-2015/r-bulletin-challenge/pull/5.diff","patch_url":"https://github.com/nyc-purple-martins-2015/r-bulletin-challenge/pull/5.patch","issue_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/issues/5","number":5,"state":"open","locked":false,"title":"Pair ajessee,aklap","user":{"login":"aklap","id":12205520,"avatar_url":"https://avatars.githubusercontent.com/u/12205520?v=3","gravatar_id":"","url":"https://api.github.com/users/aklap","html_url":"https://github.com/aklap","followers_url":"https://api.github.com/users/aklap/followers","following_url":"https://api.github.com/users/aklap/following{/other_user}","gists_url":"https://api.github.com/users/aklap/gists{/gist_id}","starred_url":"https://api.github.com/users/aklap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aklap/subscriptions","organizations_url":"https://api.github.com/users/aklap/orgs","repos_url":"https://api.github.com/users/aklap/repos","events_url":"https://api.github.com/users/aklap/events{/privacy}","received_events_url":"https://api.github.com/users/aklap/received_events","type":"User","site_admin":false},"body":"@sgharms @stevecass @dbc-nyc-coaches \r\n\r\nCan a brother and sister get a code review?","created_at":"2015-11-10T00:32:12Z","updated_at":"2015-11-10T22:52:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9bb349da0aa006ac0f93db61d759c0d38834515","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/pulls/5/commits","review_comments_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/pulls/5/comments","review_comment_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/issues/5/comments","statuses_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/statuses/7a9eac6af215153c7aa447cb84d6f053fd16faf0","head":{"label":"nyc-purple-martins-2015:pair-ajessee,aklap","ref":"pair-ajessee,aklap","sha":"7a9eac6af215153c7aa447cb84d6f053fd16faf0","user":{"login":"nyc-purple-martins-2015","id":10661914,"avatar_url":"https://avatars.githubusercontent.com/u/10661914?v=3","gravatar_id":"","url":"https://api.github.com/users/nyc-purple-martins-2015","html_url":"https://github.com/nyc-purple-martins-2015","followers_url":"https://api.github.com/users/nyc-purple-martins-2015/followers","following_url":"https://api.github.com/users/nyc-purple-martins-2015/following{/other_user}","gists_url":"https://api.github.com/users/nyc-purple-martins-2015/gists{/gist_id}","starred_url":"https://api.github.com/users/nyc-purple-martins-2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyc-purple-martins-2015/subscriptions","organizations_url":"https://api.github.com/users/nyc-purple-martins-2015/orgs","repos_url":"https://api.github.com/users/nyc-purple-martins-2015/repos","events_url":"https://api.github.com/users/nyc-purple-martins-2015/events{/privacy}","received_events_url":"https://api.github.com/users/nyc-purple-martins-2015/received_events","type":"Organization","site_admin":false},"repo":{"id":45741072,"name":"r-bulletin-challenge","full_name":"nyc-purple-martins-2015/r-bulletin-challenge","owner":{"login":"nyc-purple-martins-2015","id":10661914,"avatar_url":"https://avatars.githubusercontent.com/u/10661914?v=3","gravatar_id":"","url":"https://api.github.com/users/nyc-purple-martins-2015","html_url":"https://github.com/nyc-purple-martins-2015","followers_url":"https://api.github.com/users/nyc-purple-martins-2015/followers","following_url":"https://api.github.com/users/nyc-purple-martins-2015/following{/other_user}","gists_url":"https://api.github.com/users/nyc-purple-martins-2015/gists{/gist_id}","starred_url":"https://api.github.com/users/nyc-purple-martins-2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyc-purple-martins-2015/subscriptions","organizations_url":"https://api.github.com/users/nyc-purple-martins-2015/orgs","repos_url":"https://api.github.com/users/nyc-purple-martins-2015/repos","events_url":"https://api.github.com/users/nyc-purple-martins-2015/events{/privacy}","received_events_url":"https://api.github.com/users/nyc-purple-martins-2015/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nyc-purple-martins-2015/r-bulletin-challenge","description":"Implement a simple forum system in rails","fork":false,"url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge","forks_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/forks","keys_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/teams","hooks_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/hooks","issue_events_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/events","assignees_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/tags","blobs_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/languages","stargazers_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/stargazers","contributors_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/contributors","subscribers_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/subscribers","subscription_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/subscription","commits_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/merges","archive_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/downloads","issues_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/labels{/name}","releases_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/releases{/id}","created_at":"2015-11-07T15:07:00Z","updated_at":"2015-11-07T15:07:36Z","pushed_at":"2015-11-10T22:11:56Z","git_url":"git://github.com/nyc-purple-martins-2015/r-bulletin-challenge.git","ssh_url":"git@github.com:nyc-purple-martins-2015/r-bulletin-challenge.git","clone_url":"https://github.com/nyc-purple-martins-2015/r-bulletin-challenge.git","svn_url":"https://github.com/nyc-purple-martins-2015/r-bulletin-challenge","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":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"nyc-purple-martins-2015:master","ref":"master","sha":"2f68c22929c958d9589a588b76588759e0cd370e","user":{"login":"nyc-purple-martins-2015","id":10661914,"avatar_url":"https://avatars.githubusercontent.com/u/10661914?v=3","gravatar_id":"","url":"https://api.github.com/users/nyc-purple-martins-2015","html_url":"https://github.com/nyc-purple-martins-2015","followers_url":"https://api.github.com/users/nyc-purple-martins-2015/followers","following_url":"https://api.github.com/users/nyc-purple-martins-2015/following{/other_user}","gists_url":"https://api.github.com/users/nyc-purple-martins-2015/gists{/gist_id}","starred_url":"https://api.github.com/users/nyc-purple-martins-2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyc-purple-martins-2015/subscriptions","organizations_url":"https://api.github.com/users/nyc-purple-martins-2015/orgs","repos_url":"https://api.github.com/users/nyc-purple-martins-2015/repos","events_url":"https://api.github.com/users/nyc-purple-martins-2015/events{/privacy}","received_events_url":"https://api.github.com/users/nyc-purple-martins-2015/received_events","type":"Organization","site_admin":false},"repo":{"id":45741072,"name":"r-bulletin-challenge","full_name":"nyc-purple-martins-2015/r-bulletin-challenge","owner":{"login":"nyc-purple-martins-2015","id":10661914,"avatar_url":"https://avatars.githubusercontent.com/u/10661914?v=3","gravatar_id":"","url":"https://api.github.com/users/nyc-purple-martins-2015","html_url":"https://github.com/nyc-purple-martins-2015","followers_url":"https://api.github.com/users/nyc-purple-martins-2015/followers","following_url":"https://api.github.com/users/nyc-purple-martins-2015/following{/other_user}","gists_url":"https://api.github.com/users/nyc-purple-martins-2015/gists{/gist_id}","starred_url":"https://api.github.com/users/nyc-purple-martins-2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nyc-purple-martins-2015/subscriptions","organizations_url":"https://api.github.com/users/nyc-purple-martins-2015/orgs","repos_url":"https://api.github.com/users/nyc-purple-martins-2015/repos","events_url":"https://api.github.com/users/nyc-purple-martins-2015/events{/privacy}","received_events_url":"https://api.github.com/users/nyc-purple-martins-2015/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nyc-purple-martins-2015/r-bulletin-challenge","description":"Implement a simple forum system in rails","fork":false,"url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge","forks_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/forks","keys_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/teams","hooks_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/hooks","issue_events_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/issues/events{/number}","events_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/events","assignees_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/assignees{/user}","branches_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/branches{/branch}","tags_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/tags","blobs_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/git/refs{/sha}","trees_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/statuses/{sha}","languages_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/languages","stargazers_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/stargazers","contributors_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/contributors","subscribers_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/subscribers","subscription_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/subscription","commits_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/commits{/sha}","git_commits_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/git/commits{/sha}","comments_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/comments{/number}","issue_comment_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/issues/comments{/number}","contents_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/contents/{+path}","compare_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/merges","archive_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/downloads","issues_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/issues{/number}","pulls_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/pulls{/number}","milestones_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/milestones{/number}","notifications_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/labels{/name}","releases_url":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/releases{/id}","created_at":"2015-11-07T15:07:00Z","updated_at":"2015-11-07T15:07:36Z","pushed_at":"2015-11-10T22:11:56Z","git_url":"git://github.com/nyc-purple-martins-2015/r-bulletin-challenge.git","ssh_url":"git@github.com:nyc-purple-martins-2015/r-bulletin-challenge.git","clone_url":"https://github.com/nyc-purple-martins-2015/r-bulletin-challenge.git","svn_url":"https://github.com/nyc-purple-martins-2015/r-bulletin-challenge","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":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/pulls/5"},"html":{"href":"https://github.com/nyc-purple-martins-2015/r-bulletin-challenge/pull/5"},"issue":{"href":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/issues/5"},"comments":{"href":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/nyc-purple-martins-2015/r-bulletin-challenge/statuses/7a9eac6af215153c7aa447cb84d6f053fd16faf0"}}}}