{"action":"created","comment":{"url":"https://api.github.com/repos/paircolumbus/NotAllowed/pulls/comments/31543725","id":31543725,"diff_hunk":"@@ -2,13 +2,14 @@ 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+    #TODO: redo using sessions table\n+    !!current_user\n   end\n \n   def current_user\n-  end\n-\n-  def authenticate_user\n+    @current_user ||= User.find_by(id: session[:user_id]) if session[:user_id]","path":"source/app/controllers/application_controller.rb","position":15,"original_position":15,"commit_id":"1cd6f06a32376933fd87e31bf06a2035b1e4632b","original_commit_id":"1cd6f06a32376933fd87e31bf06a2035b1e4632b","user":{"login":"jaybobo","id":5685984,"avatar_url":"https://avatars.githubusercontent.com/u/5685984?v=3","gravatar_id":"","url":"https://api.github.com/users/jaybobo","html_url":"https://github.com/jaybobo","followers_url":"https://api.github.com/users/jaybobo/followers","following_url":"https://api.github.com/users/jaybobo/following{/other_user}","gists_url":"https://api.github.com/users/jaybobo/gists{/gist_id}","starred_url":"https://api.github.com/users/jaybobo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaybobo/subscriptions","organizations_url":"https://api.github.com/users/jaybobo/orgs","repos_url":"https://api.github.com/users/jaybobo/repos","events_url":"https://api.github.com/users/jaybobo/events{/privacy}","received_events_url":"https://api.github.com/users/jaybobo/received_events","type":"User","site_admin":false},"body":"if logged_in?","created_at":"2015-06-02T16:47:46Z","updated_at":"2015-06-02T16:47:46Z","html_url":"https://github.com/paircolumbus/NotAllowed/pull/6#discussion_r31543725","pull_request_url":"https://api.github.com/repos/paircolumbus/NotAllowed/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/paircolumbus/NotAllowed/pulls/comments/31543725"},"html":{"href":"https://github.com/paircolumbus/NotAllowed/pull/6#discussion_r31543725"},"pull_request":{"href":"https://api.github.com/repos/paircolumbus/NotAllowed/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/paircolumbus/NotAllowed/pulls/6","id":36743963,"html_url":"https://github.com/paircolumbus/NotAllowed/pull/6","diff_url":"https://github.com/paircolumbus/NotAllowed/pull/6.diff","patch_url":"https://github.com/paircolumbus/NotAllowed/pull/6.patch","issue_url":"https://api.github.com/repos/paircolumbus/NotAllowed/issues/6","number":6,"state":"open","locked":false,"title":"Pmueller solution","user":{"login":"felix-starman","id":6015288,"avatar_url":"https://avatars.githubusercontent.com/u/6015288?v=3","gravatar_id":"","url":"https://api.github.com/users/felix-starman","html_url":"https://github.com/felix-starman","followers_url":"https://api.github.com/users/felix-starman/followers","following_url":"https://api.github.com/users/felix-starman/following{/other_user}","gists_url":"https://api.github.com/users/felix-starman/gists{/gist_id}","starred_url":"https://api.github.com/users/felix-starman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felix-starman/subscriptions","organizations_url":"https://api.github.com/users/felix-starman/orgs","repos_url":"https://api.github.com/users/felix-starman/repos","events_url":"https://api.github.com/users/felix-starman/events{/privacy}","received_events_url":"https://api.github.com/users/felix-starman/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-02T15:51:33Z","updated_at":"2015-06-02T16:47:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9db675af71020f68891fb35588eec6daf358e0a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/paircolumbus/NotAllowed/pulls/6/commits","review_comments_url":"https://api.github.com/repos/paircolumbus/NotAllowed/pulls/6/comments","review_comment_url":"https://api.github.com/repos/paircolumbus/NotAllowed/pulls/comments{/number}","comments_url":"https://api.github.com/repos/paircolumbus/NotAllowed/issues/6/comments","statuses_url":"https://api.github.com/repos/paircolumbus/NotAllowed/statuses/1cd6f06a32376933fd87e31bf06a2035b1e4632b","head":{"label":"paircolumbus:pmueller-solution","ref":"pmueller-solution","sha":"1cd6f06a32376933fd87e31bf06a2035b1e4632b","user":{"login":"paircolumbus","id":8568348,"avatar_url":"https://avatars.githubusercontent.com/u/8568348?v=3","gravatar_id":"","url":"https://api.github.com/users/paircolumbus","html_url":"https://github.com/paircolumbus","followers_url":"https://api.github.com/users/paircolumbus/followers","following_url":"https://api.github.com/users/paircolumbus/following{/other_user}","gists_url":"https://api.github.com/users/paircolumbus/gists{/gist_id}","starred_url":"https://api.github.com/users/paircolumbus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paircolumbus/subscriptions","organizations_url":"https://api.github.com/users/paircolumbus/orgs","repos_url":"https://api.github.com/users/paircolumbus/repos","events_url":"https://api.github.com/users/paircolumbus/events{/privacy}","received_events_url":"https://api.github.com/users/paircolumbus/received_events","type":"Organization","site_admin":false},"repo":{"id":25717895,"name":"NotAllowed","full_name":"paircolumbus/NotAllowed","owner":{"login":"paircolumbus","id":8568348,"avatar_url":"https://avatars.githubusercontent.com/u/8568348?v=3","gravatar_id":"","url":"https://api.github.com/users/paircolumbus","html_url":"https://github.com/paircolumbus","followers_url":"https://api.github.com/users/paircolumbus/followers","following_url":"https://api.github.com/users/paircolumbus/following{/other_user}","gists_url":"https://api.github.com/users/paircolumbus/gists{/gist_id}","starred_url":"https://api.github.com/users/paircolumbus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paircolumbus/subscriptions","organizations_url":"https://api.github.com/users/paircolumbus/orgs","repos_url":"https://api.github.com/users/paircolumbus/repos","events_url":"https://api.github.com/users/paircolumbus/events{/privacy}","received_events_url":"https://api.github.com/users/paircolumbus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/paircolumbus/NotAllowed","description":"A Rails user authentication challenge","fork":false,"url":"https://api.github.com/repos/paircolumbus/NotAllowed","forks_url":"https://api.github.com/repos/paircolumbus/NotAllowed/forks","keys_url":"https://api.github.com/repos/paircolumbus/NotAllowed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paircolumbus/NotAllowed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paircolumbus/NotAllowed/teams","hooks_url":"https://api.github.com/repos/paircolumbus/NotAllowed/hooks","issue_events_url":"https://api.github.com/repos/paircolumbus/NotAllowed/issues/events{/number}","events_url":"https://api.github.com/repos/paircolumbus/NotAllowed/events","assignees_url":"https://api.github.com/repos/paircolumbus/NotAllowed/assignees{/user}","branches_url":"https://api.github.com/repos/paircolumbus/NotAllowed/branches{/branch}","tags_url":"https://api.github.com/repos/paircolumbus/NotAllowed/tags","blobs_url":"https://api.github.com/repos/paircolumbus/NotAllowed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paircolumbus/NotAllowed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paircolumbus/NotAllowed/git/refs{/sha}","trees_url":"https://api.github.com/repos/paircolumbus/NotAllowed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paircolumbus/NotAllowed/statuses/{sha}","languages_url":"https://api.github.com/repos/paircolumbus/NotAllowed/languages","stargazers_url":"https://api.github.com/repos/paircolumbus/NotAllowed/stargazers","contributors_url":"https://api.github.com/repos/paircolumbus/NotAllowed/contributors","subscribers_url":"https://api.github.com/repos/paircolumbus/NotAllowed/subscribers","subscription_url":"https://api.github.com/repos/paircolumbus/NotAllowed/subscription","commits_url":"https://api.github.com/repos/paircolumbus/NotAllowed/commits{/sha}","git_commits_url":"https://api.github.com/repos/paircolumbus/NotAllowed/git/commits{/sha}","comments_url":"https://api.github.com/repos/paircolumbus/NotAllowed/comments{/number}","issue_comment_url":"https://api.github.com/repos/paircolumbus/NotAllowed/issues/comments{/number}","contents_url":"https://api.github.com/repos/paircolumbus/NotAllowed/contents/{+path}","compare_url":"https://api.github.com/repos/paircolumbus/NotAllowed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paircolumbus/NotAllowed/merges","archive_url":"https://api.github.com/repos/paircolumbus/NotAllowed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paircolumbus/NotAllowed/downloads","issues_url":"https://api.github.com/repos/paircolumbus/NotAllowed/issues{/number}","pulls_url":"https://api.github.com/repos/paircolumbus/NotAllowed/pulls{/number}","milestones_url":"https://api.github.com/repos/paircolumbus/NotAllowed/milestones{/number}","notifications_url":"https://api.github.com/repos/paircolumbus/NotAllowed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paircolumbus/NotAllowed/labels{/name}","releases_url":"https://api.github.com/repos/paircolumbus/NotAllowed/releases{/id}","created_at":"2014-10-25T02:56:37Z","updated_at":"2015-01-02T17:45:00Z","pushed_at":"2015-06-02T15:51:34Z","git_url":"git://github.com/paircolumbus/NotAllowed.git","ssh_url":"git@github.com:paircolumbus/NotAllowed.git","clone_url":"https://github.com/paircolumbus/NotAllowed.git","svn_url":"https://github.com/paircolumbus/NotAllowed","homepage":null,"size":300,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"paircolumbus:master","ref":"master","sha":"645c8aaa784d71a9cc92e452fe9598a5d4a44e14","user":{"login":"paircolumbus","id":8568348,"avatar_url":"https://avatars.githubusercontent.com/u/8568348?v=3","gravatar_id":"","url":"https://api.github.com/users/paircolumbus","html_url":"https://github.com/paircolumbus","followers_url":"https://api.github.com/users/paircolumbus/followers","following_url":"https://api.github.com/users/paircolumbus/following{/other_user}","gists_url":"https://api.github.com/users/paircolumbus/gists{/gist_id}","starred_url":"https://api.github.com/users/paircolumbus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paircolumbus/subscriptions","organizations_url":"https://api.github.com/users/paircolumbus/orgs","repos_url":"https://api.github.com/users/paircolumbus/repos","events_url":"https://api.github.com/users/paircolumbus/events{/privacy}","received_events_url":"https://api.github.com/users/paircolumbus/received_events","type":"Organization","site_admin":false},"repo":{"id":25717895,"name":"NotAllowed","full_name":"paircolumbus/NotAllowed","owner":{"login":"paircolumbus","id":8568348,"avatar_url":"https://avatars.githubusercontent.com/u/8568348?v=3","gravatar_id":"","url":"https://api.github.com/users/paircolumbus","html_url":"https://github.com/paircolumbus","followers_url":"https://api.github.com/users/paircolumbus/followers","following_url":"https://api.github.com/users/paircolumbus/following{/other_user}","gists_url":"https://api.github.com/users/paircolumbus/gists{/gist_id}","starred_url":"https://api.github.com/users/paircolumbus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paircolumbus/subscriptions","organizations_url":"https://api.github.com/users/paircolumbus/orgs","repos_url":"https://api.github.com/users/paircolumbus/repos","events_url":"https://api.github.com/users/paircolumbus/events{/privacy}","received_events_url":"https://api.github.com/users/paircolumbus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/paircolumbus/NotAllowed","description":"A Rails user authentication challenge","fork":false,"url":"https://api.github.com/repos/paircolumbus/NotAllowed","forks_url":"https://api.github.com/repos/paircolumbus/NotAllowed/forks","keys_url":"https://api.github.com/repos/paircolumbus/NotAllowed/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paircolumbus/NotAllowed/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paircolumbus/NotAllowed/teams","hooks_url":"https://api.github.com/repos/paircolumbus/NotAllowed/hooks","issue_events_url":"https://api.github.com/repos/paircolumbus/NotAllowed/issues/events{/number}","events_url":"https://api.github.com/repos/paircolumbus/NotAllowed/events","assignees_url":"https://api.github.com/repos/paircolumbus/NotAllowed/assignees{/user}","branches_url":"https://api.github.com/repos/paircolumbus/NotAllowed/branches{/branch}","tags_url":"https://api.github.com/repos/paircolumbus/NotAllowed/tags","blobs_url":"https://api.github.com/repos/paircolumbus/NotAllowed/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paircolumbus/NotAllowed/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paircolumbus/NotAllowed/git/refs{/sha}","trees_url":"https://api.github.com/repos/paircolumbus/NotAllowed/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paircolumbus/NotAllowed/statuses/{sha}","languages_url":"https://api.github.com/repos/paircolumbus/NotAllowed/languages","stargazers_url":"https://api.github.com/repos/paircolumbus/NotAllowed/stargazers","contributors_url":"https://api.github.com/repos/paircolumbus/NotAllowed/contributors","subscribers_url":"https://api.github.com/repos/paircolumbus/NotAllowed/subscribers","subscription_url":"https://api.github.com/repos/paircolumbus/NotAllowed/subscription","commits_url":"https://api.github.com/repos/paircolumbus/NotAllowed/commits{/sha}","git_commits_url":"https://api.github.com/repos/paircolumbus/NotAllowed/git/commits{/sha}","comments_url":"https://api.github.com/repos/paircolumbus/NotAllowed/comments{/number}","issue_comment_url":"https://api.github.com/repos/paircolumbus/NotAllowed/issues/comments{/number}","contents_url":"https://api.github.com/repos/paircolumbus/NotAllowed/contents/{+path}","compare_url":"https://api.github.com/repos/paircolumbus/NotAllowed/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paircolumbus/NotAllowed/merges","archive_url":"https://api.github.com/repos/paircolumbus/NotAllowed/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paircolumbus/NotAllowed/downloads","issues_url":"https://api.github.com/repos/paircolumbus/NotAllowed/issues{/number}","pulls_url":"https://api.github.com/repos/paircolumbus/NotAllowed/pulls{/number}","milestones_url":"https://api.github.com/repos/paircolumbus/NotAllowed/milestones{/number}","notifications_url":"https://api.github.com/repos/paircolumbus/NotAllowed/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paircolumbus/NotAllowed/labels{/name}","releases_url":"https://api.github.com/repos/paircolumbus/NotAllowed/releases{/id}","created_at":"2014-10-25T02:56:37Z","updated_at":"2015-01-02T17:45:00Z","pushed_at":"2015-06-02T15:51:34Z","git_url":"git://github.com/paircolumbus/NotAllowed.git","ssh_url":"git@github.com:paircolumbus/NotAllowed.git","clone_url":"https://github.com/paircolumbus/NotAllowed.git","svn_url":"https://github.com/paircolumbus/NotAllowed","homepage":null,"size":300,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":6,"forks":3,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/paircolumbus/NotAllowed/pulls/6"},"html":{"href":"https://github.com/paircolumbus/NotAllowed/pull/6"},"issue":{"href":"https://api.github.com/repos/paircolumbus/NotAllowed/issues/6"},"comments":{"href":"https://api.github.com/repos/paircolumbus/NotAllowed/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/paircolumbus/NotAllowed/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/paircolumbus/NotAllowed/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/paircolumbus/NotAllowed/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/paircolumbus/NotAllowed/statuses/1cd6f06a32376933fd87e31bf06a2035b1e4632b"}}}}