{"action":"created","comment":{"url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/comments/86669926","pull_request_review_id":7318665,"id":86669926,"diff_hunk":"@@ -1,10 +1,30 @@\n-require './config/environment'\n+require \"./config/environment\"\n+require \"./app/models/user\"\n+require \"./app/models/tweet\"\n \n class ApplicationController < Sinatra::Base\n \n   configure do\n     set :public_folder, 'public'\n     set :views, 'app/views'\n+    enable :sessions\n+    set :session_secret, \"super_secret\"\n   end\n \n-end\n\\ No newline at end of file\n+#-------- Landing page --------\n+\n+  get '/' do\n+    erb :index\n+  end\n+\n+  helpers do\n+  \t\tdef logged_in?","path":"app/controllers/application_controller.rb","position":24,"original_position":24,"commit_id":"c157719e95b957d6f58f7c7eac10523dabfb7ba1","original_commit_id":"c157719e95b957d6f58f7c7eac10523dabfb7ba1","user":{"login":"Lukeghenco","id":15013243,"avatar_url":"https://avatars.githubusercontent.com/u/15013243?v=3","gravatar_id":"","url":"https://api.github.com/users/Lukeghenco","html_url":"https://github.com/Lukeghenco","followers_url":"https://api.github.com/users/Lukeghenco/followers","following_url":"https://api.github.com/users/Lukeghenco/following{/other_user}","gists_url":"https://api.github.com/users/Lukeghenco/gists{/gist_id}","starred_url":"https://api.github.com/users/Lukeghenco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lukeghenco/subscriptions","organizations_url":"https://api.github.com/users/Lukeghenco/orgs","repos_url":"https://api.github.com/users/Lukeghenco/repos","events_url":"https://api.github.com/users/Lukeghenco/events{/privacy}","received_events_url":"https://api.github.com/users/Lukeghenco/received_events","type":"User","site_admin":false},"body":"It's better to rely on the successful call to `current_user` than only introspecting on the `session[:id]` value. In theory, a user might have an invalid `id` in their session which would make `logged_in?` return true even though that user would not be findable later. Also, because `current_user` is memoized, it makes sense to call it as early in the request cycle as possible, which generally is the first call `logged_in?`.\r\n\r\n```ruby\r\ndef logged_in?\r\n  !!current_user\r\nend\r\n```","created_at":"2016-11-05T17:38:16Z","updated_at":"2016-11-05T17:44:44Z","html_url":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000/pull/229#discussion_r86669926","pull_request_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/229","_links":{"self":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/comments/86669926"},"html":{"href":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000/pull/229#discussion_r86669926"},"pull_request":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/229"}}},"pull_request":{"url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/229","id":92101303,"html_url":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000/pull/229","diff_url":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000/pull/229.diff","patch_url":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000/pull/229.patch","issue_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/issues/229","number":229,"state":"open","locked":false,"title":"Done","user":{"login":"kkterai","id":19792273,"avatar_url":"https://avatars.githubusercontent.com/u/19792273?v=3","gravatar_id":"","url":"https://api.github.com/users/kkterai","html_url":"https://github.com/kkterai","followers_url":"https://api.github.com/users/kkterai/followers","following_url":"https://api.github.com/users/kkterai/following{/other_user}","gists_url":"https://api.github.com/users/kkterai/gists{/gist_id}","starred_url":"https://api.github.com/users/kkterai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkterai/subscriptions","organizations_url":"https://api.github.com/users/kkterai/orgs","repos_url":"https://api.github.com/users/kkterai/repos","events_url":"https://api.github.com/users/kkterai/events{/privacy}","received_events_url":"https://api.github.com/users/kkterai/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-11-03T06:20:42Z","updated_at":"2016-11-05T17:44:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d556a95b144dc76c4d4820cf61f696dc85530167","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/229/commits","review_comments_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/229/comments","review_comment_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/comments{/number}","comments_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/issues/229/comments","statuses_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/statuses/c157719e95b957d6f58f7c7eac10523dabfb7ba1","head":{"label":"kkterai:master","ref":"master","sha":"c157719e95b957d6f58f7c7eac10523dabfb7ba1","user":{"login":"kkterai","id":19792273,"avatar_url":"https://avatars.githubusercontent.com/u/19792273?v=3","gravatar_id":"","url":"https://api.github.com/users/kkterai","html_url":"https://github.com/kkterai","followers_url":"https://api.github.com/users/kkterai/followers","following_url":"https://api.github.com/users/kkterai/following{/other_user}","gists_url":"https://api.github.com/users/kkterai/gists{/gist_id}","starred_url":"https://api.github.com/users/kkterai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkterai/subscriptions","organizations_url":"https://api.github.com/users/kkterai/orgs","repos_url":"https://api.github.com/users/kkterai/repos","events_url":"https://api.github.com/users/kkterai/events{/privacy}","received_events_url":"https://api.github.com/users/kkterai/received_events","type":"User","site_admin":false},"repo":{"id":72125257,"name":"sinatra-fwitter-group-project-v-000","full_name":"kkterai/sinatra-fwitter-group-project-v-000","owner":{"login":"kkterai","id":19792273,"avatar_url":"https://avatars.githubusercontent.com/u/19792273?v=3","gravatar_id":"","url":"https://api.github.com/users/kkterai","html_url":"https://github.com/kkterai","followers_url":"https://api.github.com/users/kkterai/followers","following_url":"https://api.github.com/users/kkterai/following{/other_user}","gists_url":"https://api.github.com/users/kkterai/gists{/gist_id}","starred_url":"https://api.github.com/users/kkterai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkterai/subscriptions","organizations_url":"https://api.github.com/users/kkterai/orgs","repos_url":"https://api.github.com/users/kkterai/repos","events_url":"https://api.github.com/users/kkterai/events{/privacy}","received_events_url":"https://api.github.com/users/kkterai/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kkterai/sinatra-fwitter-group-project-v-000","description":null,"fork":true,"url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000","forks_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/forks","keys_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/teams","hooks_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/hooks","issue_events_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/issues/events{/number}","events_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/events","assignees_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/assignees{/user}","branches_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/branches{/branch}","tags_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/tags","blobs_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/git/refs{/sha}","trees_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/statuses/{sha}","languages_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/languages","stargazers_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/stargazers","contributors_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/contributors","subscribers_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/subscribers","subscription_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/subscription","commits_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/commits{/sha}","git_commits_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/git/commits{/sha}","comments_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/comments{/number}","issue_comment_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/issues/comments{/number}","contents_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/contents/{+path}","compare_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/merges","archive_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/downloads","issues_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/issues{/number}","pulls_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/pulls{/number}","milestones_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/milestones{/number}","notifications_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/labels{/name}","releases_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/releases{/id}","deployments_url":"https://api.github.com/repos/kkterai/sinatra-fwitter-group-project-v-000/deployments","created_at":"2016-10-27T16:07:01Z","updated_at":"2016-10-27T16:07:02Z","pushed_at":"2016-11-03T06:23:24Z","git_url":"git://github.com/kkterai/sinatra-fwitter-group-project-v-000.git","ssh_url":"git@github.com:kkterai/sinatra-fwitter-group-project-v-000.git","clone_url":"https://github.com/kkterai/sinatra-fwitter-group-project-v-000.git","svn_url":"https://github.com/kkterai/sinatra-fwitter-group-project-v-000","homepage":null,"size":66,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"learn-co-students:master","ref":"master","sha":"ef8f0c505fcca87e663573dfc74c57fcfcd751e3","user":{"login":"learn-co-students","id":8825476,"avatar_url":"https://avatars.githubusercontent.com/u/8825476?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-students","html_url":"https://github.com/learn-co-students","followers_url":"https://api.github.com/users/learn-co-students/followers","following_url":"https://api.github.com/users/learn-co-students/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-students/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-students/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-students/subscriptions","organizations_url":"https://api.github.com/users/learn-co-students/orgs","repos_url":"https://api.github.com/users/learn-co-students/repos","events_url":"https://api.github.com/users/learn-co-students/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-students/received_events","type":"Organization","site_admin":false},"repo":{"id":48708806,"name":"sinatra-fwitter-group-project-v-000","full_name":"learn-co-students/sinatra-fwitter-group-project-v-000","owner":{"login":"learn-co-students","id":8825476,"avatar_url":"https://avatars.githubusercontent.com/u/8825476?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-co-students","html_url":"https://github.com/learn-co-students","followers_url":"https://api.github.com/users/learn-co-students/followers","following_url":"https://api.github.com/users/learn-co-students/following{/other_user}","gists_url":"https://api.github.com/users/learn-co-students/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-co-students/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-co-students/subscriptions","organizations_url":"https://api.github.com/users/learn-co-students/orgs","repos_url":"https://api.github.com/users/learn-co-students/repos","events_url":"https://api.github.com/users/learn-co-students/events{/privacy}","received_events_url":"https://api.github.com/users/learn-co-students/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000","description":null,"fork":false,"url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000","forks_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/forks","keys_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/teams","hooks_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/hooks","issue_events_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/issues/events{/number}","events_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/events","assignees_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/assignees{/user}","branches_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/branches{/branch}","tags_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/tags","blobs_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/git/refs{/sha}","trees_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/statuses/{sha}","languages_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/languages","stargazers_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/stargazers","contributors_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/contributors","subscribers_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/subscribers","subscription_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/subscription","commits_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/commits{/sha}","git_commits_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/git/commits{/sha}","comments_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/comments{/number}","issue_comment_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/issues/comments{/number}","contents_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/contents/{+path}","compare_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/merges","archive_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/downloads","issues_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/issues{/number}","pulls_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls{/number}","milestones_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/milestones{/number}","notifications_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/labels{/name}","releases_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/releases{/id}","deployments_url":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/deployments","created_at":"2015-12-28T19:27:58Z","updated_at":"2016-03-08T20:27:19Z","pushed_at":"2016-11-04T19:53:30Z","git_url":"git://github.com/learn-co-students/sinatra-fwitter-group-project-v-000.git","ssh_url":"git@github.com:learn-co-students/sinatra-fwitter-group-project-v-000.git","clone_url":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000.git","svn_url":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000","homepage":null,"size":49123,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":246,"mirror_url":null,"open_issues_count":150,"forks":246,"open_issues":150,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/229"},"html":{"href":"https://github.com/learn-co-students/sinatra-fwitter-group-project-v-000/pull/229"},"issue":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/issues/229"},"comments":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/issues/229/comments"},"review_comments":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/229/comments"},"review_comment":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/pulls/229/commits"},"statuses":{"href":"https://api.github.com/repos/learn-co-students/sinatra-fwitter-group-project-v-000/statuses/c157719e95b957d6f58f7c7eac10523dabfb7ba1"}}}}
{"actor":{"display_login":"Lukeghenco"}}