{"action":"closed","number":1,"pull_request":{"url":"https://api.github.com/repos/haneru/sample/pulls/1","id":80567446,"html_url":"https://github.com/haneru/sample/pull/1","diff_url":"https://github.com/haneru/sample/pull/1.diff","patch_url":"https://github.com/haneru/sample/pull/1.patch","issue_url":"https://api.github.com/repos/haneru/sample/issues/1","number":1,"state":"closed","locked":false,"title":"ログイン状態でcurrent_userがnilになってしまう","user":{"login":"haneru","id":17065246,"avatar_url":"https://avatars.githubusercontent.com/u/17065246?v=3","gravatar_id":"","url":"https://api.github.com/users/haneru","html_url":"https://github.com/haneru","followers_url":"https://api.github.com/users/haneru/followers","following_url":"https://api.github.com/users/haneru/following{/other_user}","gists_url":"https://api.github.com/users/haneru/gists{/gist_id}","starred_url":"https://api.github.com/users/haneru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haneru/subscriptions","organizations_url":"https://api.github.com/users/haneru/orgs","repos_url":"https://api.github.com/users/haneru/repos","events_url":"https://api.github.com/users/haneru/events{/privacy}","received_events_url":"https://api.github.com/users/haneru/received_events","type":"User","site_admin":false},"body":"def current_user\r\n    @current_user ||= User.find_by(id: session[:user_id])\r\n  end\r\n\r\n  def logged_in?\r\n    !current_user.nil?\r\n  end\r\n\r\n<% if logged_in? %>\r\n          <li><%= link_to \"Users\", '#' %></li>\r\n          <li class=\"dropdown\">\r\n            <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\r\n              Account <b class=\"caret\"></b>\r\n            </a>\r\n            <ul class=\"dropdown-menu\">\r\n              <li><%= link_to \"Profile\", current_user %></li>\r\n              <li><%= link_to \"Settings\", '#' %></li>\r\n              <li class=\"divider\"></li>\r\n              <li>\r\n                <%= link_to \"Log out\", logout_path, method: \"delete\" %>\r\n              </li>\r\n            </ul>\r\n          </li>\r\n        <% else %>\r\n          <li><%= link_to \"Log in\", login_path %></li>\r\n        <% end %>\r\n\r\nログインしている状態でヘッダーにAccountのドロップダウンメニューを出したいのだが出てこず。Log inが出てきてしまう","created_at":"2016-08-09T06:24:44Z","updated_at":"2016-08-14T15:39:57Z","closed_at":"2016-08-14T15:39:57Z","merged_at":null,"merge_commit_sha":"a9d0a3f913423b05d05edbae76e6fe81ee266829","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/haneru/sample/pulls/1/commits","review_comments_url":"https://api.github.com/repos/haneru/sample/pulls/1/comments","review_comment_url":"https://api.github.com/repos/haneru/sample/pulls/comments{/number}","comments_url":"https://api.github.com/repos/haneru/sample/issues/1/comments","statuses_url":"https://api.github.com/repos/haneru/sample/statuses/ca103eec6adf0d8d5ec0a0ae721267277891018b","head":{"label":"haneru:log-in-log-out","ref":"log-in-log-out","sha":"ca103eec6adf0d8d5ec0a0ae721267277891018b","user":{"login":"haneru","id":17065246,"avatar_url":"https://avatars.githubusercontent.com/u/17065246?v=3","gravatar_id":"","url":"https://api.github.com/users/haneru","html_url":"https://github.com/haneru","followers_url":"https://api.github.com/users/haneru/followers","following_url":"https://api.github.com/users/haneru/following{/other_user}","gists_url":"https://api.github.com/users/haneru/gists{/gist_id}","starred_url":"https://api.github.com/users/haneru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haneru/subscriptions","organizations_url":"https://api.github.com/users/haneru/orgs","repos_url":"https://api.github.com/users/haneru/repos","events_url":"https://api.github.com/users/haneru/events{/privacy}","received_events_url":"https://api.github.com/users/haneru/received_events","type":"User","site_admin":false},"repo":{"id":65129535,"name":"sample","full_name":"haneru/sample","owner":{"login":"haneru","id":17065246,"avatar_url":"https://avatars.githubusercontent.com/u/17065246?v=3","gravatar_id":"","url":"https://api.github.com/users/haneru","html_url":"https://github.com/haneru","followers_url":"https://api.github.com/users/haneru/followers","following_url":"https://api.github.com/users/haneru/following{/other_user}","gists_url":"https://api.github.com/users/haneru/gists{/gist_id}","starred_url":"https://api.github.com/users/haneru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haneru/subscriptions","organizations_url":"https://api.github.com/users/haneru/orgs","repos_url":"https://api.github.com/users/haneru/repos","events_url":"https://api.github.com/users/haneru/events{/privacy}","received_events_url":"https://api.github.com/users/haneru/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/haneru/sample","description":null,"fork":false,"url":"https://api.github.com/repos/haneru/sample","forks_url":"https://api.github.com/repos/haneru/sample/forks","keys_url":"https://api.github.com/repos/haneru/sample/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haneru/sample/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haneru/sample/teams","hooks_url":"https://api.github.com/repos/haneru/sample/hooks","issue_events_url":"https://api.github.com/repos/haneru/sample/issues/events{/number}","events_url":"https://api.github.com/repos/haneru/sample/events","assignees_url":"https://api.github.com/repos/haneru/sample/assignees{/user}","branches_url":"https://api.github.com/repos/haneru/sample/branches{/branch}","tags_url":"https://api.github.com/repos/haneru/sample/tags","blobs_url":"https://api.github.com/repos/haneru/sample/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haneru/sample/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haneru/sample/git/refs{/sha}","trees_url":"https://api.github.com/repos/haneru/sample/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haneru/sample/statuses/{sha}","languages_url":"https://api.github.com/repos/haneru/sample/languages","stargazers_url":"https://api.github.com/repos/haneru/sample/stargazers","contributors_url":"https://api.github.com/repos/haneru/sample/contributors","subscribers_url":"https://api.github.com/repos/haneru/sample/subscribers","subscription_url":"https://api.github.com/repos/haneru/sample/subscription","commits_url":"https://api.github.com/repos/haneru/sample/commits{/sha}","git_commits_url":"https://api.github.com/repos/haneru/sample/git/commits{/sha}","comments_url":"https://api.github.com/repos/haneru/sample/comments{/number}","issue_comment_url":"https://api.github.com/repos/haneru/sample/issues/comments{/number}","contents_url":"https://api.github.com/repos/haneru/sample/contents/{+path}","compare_url":"https://api.github.com/repos/haneru/sample/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haneru/sample/merges","archive_url":"https://api.github.com/repos/haneru/sample/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haneru/sample/downloads","issues_url":"https://api.github.com/repos/haneru/sample/issues{/number}","pulls_url":"https://api.github.com/repos/haneru/sample/pulls{/number}","milestones_url":"https://api.github.com/repos/haneru/sample/milestones{/number}","notifications_url":"https://api.github.com/repos/haneru/sample/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haneru/sample/labels{/name}","releases_url":"https://api.github.com/repos/haneru/sample/releases{/id}","deployments_url":"https://api.github.com/repos/haneru/sample/deployments","created_at":"2016-08-07T11:20:25Z","updated_at":"2016-08-07T11:21:09Z","pushed_at":"2016-08-09T06:24:45Z","git_url":"git://github.com/haneru/sample.git","ssh_url":"git@github.com:haneru/sample.git","clone_url":"https://github.com/haneru/sample.git","svn_url":"https://github.com/haneru/sample","homepage":null,"size":54,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"haneru:master","ref":"master","sha":"55bbc39ba51e92ed4c33b42d524e8ab8d8cd5278","user":{"login":"haneru","id":17065246,"avatar_url":"https://avatars.githubusercontent.com/u/17065246?v=3","gravatar_id":"","url":"https://api.github.com/users/haneru","html_url":"https://github.com/haneru","followers_url":"https://api.github.com/users/haneru/followers","following_url":"https://api.github.com/users/haneru/following{/other_user}","gists_url":"https://api.github.com/users/haneru/gists{/gist_id}","starred_url":"https://api.github.com/users/haneru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haneru/subscriptions","organizations_url":"https://api.github.com/users/haneru/orgs","repos_url":"https://api.github.com/users/haneru/repos","events_url":"https://api.github.com/users/haneru/events{/privacy}","received_events_url":"https://api.github.com/users/haneru/received_events","type":"User","site_admin":false},"repo":{"id":65129535,"name":"sample","full_name":"haneru/sample","owner":{"login":"haneru","id":17065246,"avatar_url":"https://avatars.githubusercontent.com/u/17065246?v=3","gravatar_id":"","url":"https://api.github.com/users/haneru","html_url":"https://github.com/haneru","followers_url":"https://api.github.com/users/haneru/followers","following_url":"https://api.github.com/users/haneru/following{/other_user}","gists_url":"https://api.github.com/users/haneru/gists{/gist_id}","starred_url":"https://api.github.com/users/haneru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haneru/subscriptions","organizations_url":"https://api.github.com/users/haneru/orgs","repos_url":"https://api.github.com/users/haneru/repos","events_url":"https://api.github.com/users/haneru/events{/privacy}","received_events_url":"https://api.github.com/users/haneru/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/haneru/sample","description":null,"fork":false,"url":"https://api.github.com/repos/haneru/sample","forks_url":"https://api.github.com/repos/haneru/sample/forks","keys_url":"https://api.github.com/repos/haneru/sample/keys{/key_id}","collaborators_url":"https://api.github.com/repos/haneru/sample/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/haneru/sample/teams","hooks_url":"https://api.github.com/repos/haneru/sample/hooks","issue_events_url":"https://api.github.com/repos/haneru/sample/issues/events{/number}","events_url":"https://api.github.com/repos/haneru/sample/events","assignees_url":"https://api.github.com/repos/haneru/sample/assignees{/user}","branches_url":"https://api.github.com/repos/haneru/sample/branches{/branch}","tags_url":"https://api.github.com/repos/haneru/sample/tags","blobs_url":"https://api.github.com/repos/haneru/sample/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/haneru/sample/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/haneru/sample/git/refs{/sha}","trees_url":"https://api.github.com/repos/haneru/sample/git/trees{/sha}","statuses_url":"https://api.github.com/repos/haneru/sample/statuses/{sha}","languages_url":"https://api.github.com/repos/haneru/sample/languages","stargazers_url":"https://api.github.com/repos/haneru/sample/stargazers","contributors_url":"https://api.github.com/repos/haneru/sample/contributors","subscribers_url":"https://api.github.com/repos/haneru/sample/subscribers","subscription_url":"https://api.github.com/repos/haneru/sample/subscription","commits_url":"https://api.github.com/repos/haneru/sample/commits{/sha}","git_commits_url":"https://api.github.com/repos/haneru/sample/git/commits{/sha}","comments_url":"https://api.github.com/repos/haneru/sample/comments{/number}","issue_comment_url":"https://api.github.com/repos/haneru/sample/issues/comments{/number}","contents_url":"https://api.github.com/repos/haneru/sample/contents/{+path}","compare_url":"https://api.github.com/repos/haneru/sample/compare/{base}...{head}","merges_url":"https://api.github.com/repos/haneru/sample/merges","archive_url":"https://api.github.com/repos/haneru/sample/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/haneru/sample/downloads","issues_url":"https://api.github.com/repos/haneru/sample/issues{/number}","pulls_url":"https://api.github.com/repos/haneru/sample/pulls{/number}","milestones_url":"https://api.github.com/repos/haneru/sample/milestones{/number}","notifications_url":"https://api.github.com/repos/haneru/sample/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/haneru/sample/labels{/name}","releases_url":"https://api.github.com/repos/haneru/sample/releases{/id}","deployments_url":"https://api.github.com/repos/haneru/sample/deployments","created_at":"2016-08-07T11:20:25Z","updated_at":"2016-08-07T11:21:09Z","pushed_at":"2016-08-09T06:24:45Z","git_url":"git://github.com/haneru/sample.git","ssh_url":"git@github.com:haneru/sample.git","clone_url":"https://github.com/haneru/sample.git","svn_url":"https://github.com/haneru/sample","homepage":null,"size":54,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/haneru/sample/pulls/1"},"html":{"href":"https://github.com/haneru/sample/pull/1"},"issue":{"href":"https://api.github.com/repos/haneru/sample/issues/1"},"comments":{"href":"https://api.github.com/repos/haneru/sample/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/haneru/sample/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/haneru/sample/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/haneru/sample/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/haneru/sample/statuses/ca103eec6adf0d8d5ec0a0ae721267277891018b"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":107,"deletions":3,"changed_files":12}}
{"actor":{"display_login":"haneru"}}