{"action":"created","comment":{"url":"https://api.github.com/repos/katanoZ/project-cards-app/pulls/comments/178459241","pull_request_review_id":108519532,"id":178459241,"diff_hunk":"@@ -11,11 +11,15 @@ def logged_in?\n \n   def current_user\n     return unless logged_in?\n-    @current_user ||= User.find(session[:user_id])\n+    @current_user ||= User.find(session[:user_id]).decorate\n+  end\n+\n+  def logged_in_by_correct_user?\n+    logged_in? && User.exists?(session[:user_id])","path":"app/controllers/application_controller.rb","position":18,"original_position":18,"commit_id":"39ce9958a184f0a0b780647d671a63b81007d94d","original_commit_id":"39ce9958a184f0a0b780647d671a63b81007d94d","user":{"login":"stivan622","id":20553255,"avatar_url":"https://avatars1.githubusercontent.com/u/20553255?v=4","gravatar_id":"","url":"https://api.github.com/users/stivan622","html_url":"https://github.com/stivan622","followers_url":"https://api.github.com/users/stivan622/followers","following_url":"https://api.github.com/users/stivan622/following{/other_user}","gists_url":"https://api.github.com/users/stivan622/gists{/gist_id}","starred_url":"https://api.github.com/users/stivan622/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stivan622/subscriptions","organizations_url":"https://api.github.com/users/stivan622/orgs","repos_url":"https://api.github.com/users/stivan622/repos","events_url":"https://api.github.com/users/stivan622/events{/privacy}","received_events_url":"https://api.github.com/users/stivan622/received_events","type":"User","site_admin":false},"body":"なるほどーりょーかいです！","created_at":"2018-04-01T14:06:17Z","updated_at":"2018-04-01T14:06:17Z","html_url":"https://github.com/katanoZ/project-cards-app/pull/21#discussion_r178459241","pull_request_url":"https://api.github.com/repos/katanoZ/project-cards-app/pulls/21","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/katanoZ/project-cards-app/pulls/comments/178459241"},"html":{"href":"https://github.com/katanoZ/project-cards-app/pull/21#discussion_r178459241"},"pull_request":{"href":"https://api.github.com/repos/katanoZ/project-cards-app/pulls/21"}},"in_reply_to_id":178453117},"pull_request":{"url":"https://api.github.com/repos/katanoZ/project-cards-app/pulls/21","id":178716924,"html_url":"https://github.com/katanoZ/project-cards-app/pull/21","diff_url":"https://github.com/katanoZ/project-cards-app/pull/21.diff","patch_url":"https://github.com/katanoZ/project-cards-app/pull/21.patch","issue_url":"https://api.github.com/repos/katanoZ/project-cards-app/issues/21","number":21,"state":"open","locked":false,"title":"名前、プロフール画像を変更できるよう対応","user":{"login":"katanoZ","id":3204814,"avatar_url":"https://avatars3.githubusercontent.com/u/3204814?v=4","gravatar_id":"","url":"https://api.github.com/users/katanoZ","html_url":"https://github.com/katanoZ","followers_url":"https://api.github.com/users/katanoZ/followers","following_url":"https://api.github.com/users/katanoZ/following{/other_user}","gists_url":"https://api.github.com/users/katanoZ/gists{/gist_id}","starred_url":"https://api.github.com/users/katanoZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katanoZ/subscriptions","organizations_url":"https://api.github.com/users/katanoZ/orgs","repos_url":"https://api.github.com/users/katanoZ/repos","events_url":"https://api.github.com/users/katanoZ/events{/privacy}","received_events_url":"https://api.github.com/users/katanoZ/received_events","type":"User","site_admin":false},"body":"ref #15 \r\n名前、プロフール画像を変更できるようにしました。確認をお願いします。\r\n\r\n・名前を変更できるよう対応（users_controller#updateに実装）\r\n・プロフィール画像を変更できるよう対応（carrierwaveの導入・設定、usersテーブルにmy_imageとsns_imageカラムを設定）\r\n・日本語のバリデーションエラーメッセージを設定\r\n・画像をcloudinaryに保存できるよう設定\r\n・Decoratorを導入して、マイページ画面のviewを整理（app/views/users/edit.html.slim）\r\n\r\n・ユーザ認証を修正（ブラウザにセッションが残っていても、dbにないユーザは受け付けない・異常状態でもサーバエラーが起こらないよう修正）\r\n→application_controllerにlogged_in_by_correct_user?メソッドを作成\r\n\r\n※バリデーションはサーバサイドに処理を統一した方が良いと考えたため、マイページの更新ボタンの効果（入力項目が変化した場合にのみ更新可能にするjquery）を削除した。","created_at":"2018-04-01T07:08:25Z","updated_at":"2018-04-01T14:06:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff8f7d15ca532389c10b279d50a10cffeefe1c32","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/katanoZ/project-cards-app/pulls/21/commits","review_comments_url":"https://api.github.com/repos/katanoZ/project-cards-app/pulls/21/comments","review_comment_url":"https://api.github.com/repos/katanoZ/project-cards-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/katanoZ/project-cards-app/issues/21/comments","statuses_url":"https://api.github.com/repos/katanoZ/project-cards-app/statuses/39ce9958a184f0a0b780647d671a63b81007d94d","head":{"label":"katanoZ:issues#15_1","ref":"issues#15_1","sha":"39ce9958a184f0a0b780647d671a63b81007d94d","user":{"login":"katanoZ","id":3204814,"avatar_url":"https://avatars3.githubusercontent.com/u/3204814?v=4","gravatar_id":"","url":"https://api.github.com/users/katanoZ","html_url":"https://github.com/katanoZ","followers_url":"https://api.github.com/users/katanoZ/followers","following_url":"https://api.github.com/users/katanoZ/following{/other_user}","gists_url":"https://api.github.com/users/katanoZ/gists{/gist_id}","starred_url":"https://api.github.com/users/katanoZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katanoZ/subscriptions","organizations_url":"https://api.github.com/users/katanoZ/orgs","repos_url":"https://api.github.com/users/katanoZ/repos","events_url":"https://api.github.com/users/katanoZ/events{/privacy}","received_events_url":"https://api.github.com/users/katanoZ/received_events","type":"User","site_admin":false},"repo":{"id":124082675,"name":"project-cards-app","full_name":"katanoZ/project-cards-app","owner":{"login":"katanoZ","id":3204814,"avatar_url":"https://avatars3.githubusercontent.com/u/3204814?v=4","gravatar_id":"","url":"https://api.github.com/users/katanoZ","html_url":"https://github.com/katanoZ","followers_url":"https://api.github.com/users/katanoZ/followers","following_url":"https://api.github.com/users/katanoZ/following{/other_user}","gists_url":"https://api.github.com/users/katanoZ/gists{/gist_id}","starred_url":"https://api.github.com/users/katanoZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katanoZ/subscriptions","organizations_url":"https://api.github.com/users/katanoZ/orgs","repos_url":"https://api.github.com/users/katanoZ/repos","events_url":"https://api.github.com/users/katanoZ/events{/privacy}","received_events_url":"https://api.github.com/users/katanoZ/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/katanoZ/project-cards-app","description":null,"fork":false,"url":"https://api.github.com/repos/katanoZ/project-cards-app","forks_url":"https://api.github.com/repos/katanoZ/project-cards-app/forks","keys_url":"https://api.github.com/repos/katanoZ/project-cards-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/katanoZ/project-cards-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/katanoZ/project-cards-app/teams","hooks_url":"https://api.github.com/repos/katanoZ/project-cards-app/hooks","issue_events_url":"https://api.github.com/repos/katanoZ/project-cards-app/issues/events{/number}","events_url":"https://api.github.com/repos/katanoZ/project-cards-app/events","assignees_url":"https://api.github.com/repos/katanoZ/project-cards-app/assignees{/user}","branches_url":"https://api.github.com/repos/katanoZ/project-cards-app/branches{/branch}","tags_url":"https://api.github.com/repos/katanoZ/project-cards-app/tags","blobs_url":"https://api.github.com/repos/katanoZ/project-cards-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/katanoZ/project-cards-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/katanoZ/project-cards-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/katanoZ/project-cards-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/katanoZ/project-cards-app/statuses/{sha}","languages_url":"https://api.github.com/repos/katanoZ/project-cards-app/languages","stargazers_url":"https://api.github.com/repos/katanoZ/project-cards-app/stargazers","contributors_url":"https://api.github.com/repos/katanoZ/project-cards-app/contributors","subscribers_url":"https://api.github.com/repos/katanoZ/project-cards-app/subscribers","subscription_url":"https://api.github.com/repos/katanoZ/project-cards-app/subscription","commits_url":"https://api.github.com/repos/katanoZ/project-cards-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/katanoZ/project-cards-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/katanoZ/project-cards-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/katanoZ/project-cards-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/katanoZ/project-cards-app/contents/{+path}","compare_url":"https://api.github.com/repos/katanoZ/project-cards-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/katanoZ/project-cards-app/merges","archive_url":"https://api.github.com/repos/katanoZ/project-cards-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/katanoZ/project-cards-app/downloads","issues_url":"https://api.github.com/repos/katanoZ/project-cards-app/issues{/number}","pulls_url":"https://api.github.com/repos/katanoZ/project-cards-app/pulls{/number}","milestones_url":"https://api.github.com/repos/katanoZ/project-cards-app/milestones{/number}","notifications_url":"https://api.github.com/repos/katanoZ/project-cards-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/katanoZ/project-cards-app/labels{/name}","releases_url":"https://api.github.com/repos/katanoZ/project-cards-app/releases{/id}","deployments_url":"https://api.github.com/repos/katanoZ/project-cards-app/deployments","created_at":"2018-03-06T13:31:57Z","updated_at":"2018-04-01T06:20:19Z","pushed_at":"2018-04-01T07:08:25Z","git_url":"git://github.com/katanoZ/project-cards-app.git","ssh_url":"git@github.com:katanoZ/project-cards-app.git","clone_url":"https://github.com/katanoZ/project-cards-app.git","svn_url":"https://github.com/katanoZ/project-cards-app","homepage":null,"size":434,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":0,"open_issues":4,"watchers":0,"default_branch":"develop"}},"base":{"label":"katanoZ:develop","ref":"develop","sha":"e6dcdcebb20455cbad0a49a9481b8040dfee8ed8","user":{"login":"katanoZ","id":3204814,"avatar_url":"https://avatars3.githubusercontent.com/u/3204814?v=4","gravatar_id":"","url":"https://api.github.com/users/katanoZ","html_url":"https://github.com/katanoZ","followers_url":"https://api.github.com/users/katanoZ/followers","following_url":"https://api.github.com/users/katanoZ/following{/other_user}","gists_url":"https://api.github.com/users/katanoZ/gists{/gist_id}","starred_url":"https://api.github.com/users/katanoZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katanoZ/subscriptions","organizations_url":"https://api.github.com/users/katanoZ/orgs","repos_url":"https://api.github.com/users/katanoZ/repos","events_url":"https://api.github.com/users/katanoZ/events{/privacy}","received_events_url":"https://api.github.com/users/katanoZ/received_events","type":"User","site_admin":false},"repo":{"id":124082675,"name":"project-cards-app","full_name":"katanoZ/project-cards-app","owner":{"login":"katanoZ","id":3204814,"avatar_url":"https://avatars3.githubusercontent.com/u/3204814?v=4","gravatar_id":"","url":"https://api.github.com/users/katanoZ","html_url":"https://github.com/katanoZ","followers_url":"https://api.github.com/users/katanoZ/followers","following_url":"https://api.github.com/users/katanoZ/following{/other_user}","gists_url":"https://api.github.com/users/katanoZ/gists{/gist_id}","starred_url":"https://api.github.com/users/katanoZ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katanoZ/subscriptions","organizations_url":"https://api.github.com/users/katanoZ/orgs","repos_url":"https://api.github.com/users/katanoZ/repos","events_url":"https://api.github.com/users/katanoZ/events{/privacy}","received_events_url":"https://api.github.com/users/katanoZ/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/katanoZ/project-cards-app","description":null,"fork":false,"url":"https://api.github.com/repos/katanoZ/project-cards-app","forks_url":"https://api.github.com/repos/katanoZ/project-cards-app/forks","keys_url":"https://api.github.com/repos/katanoZ/project-cards-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/katanoZ/project-cards-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/katanoZ/project-cards-app/teams","hooks_url":"https://api.github.com/repos/katanoZ/project-cards-app/hooks","issue_events_url":"https://api.github.com/repos/katanoZ/project-cards-app/issues/events{/number}","events_url":"https://api.github.com/repos/katanoZ/project-cards-app/events","assignees_url":"https://api.github.com/repos/katanoZ/project-cards-app/assignees{/user}","branches_url":"https://api.github.com/repos/katanoZ/project-cards-app/branches{/branch}","tags_url":"https://api.github.com/repos/katanoZ/project-cards-app/tags","blobs_url":"https://api.github.com/repos/katanoZ/project-cards-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/katanoZ/project-cards-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/katanoZ/project-cards-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/katanoZ/project-cards-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/katanoZ/project-cards-app/statuses/{sha}","languages_url":"https://api.github.com/repos/katanoZ/project-cards-app/languages","stargazers_url":"https://api.github.com/repos/katanoZ/project-cards-app/stargazers","contributors_url":"https://api.github.com/repos/katanoZ/project-cards-app/contributors","subscribers_url":"https://api.github.com/repos/katanoZ/project-cards-app/subscribers","subscription_url":"https://api.github.com/repos/katanoZ/project-cards-app/subscription","commits_url":"https://api.github.com/repos/katanoZ/project-cards-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/katanoZ/project-cards-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/katanoZ/project-cards-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/katanoZ/project-cards-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/katanoZ/project-cards-app/contents/{+path}","compare_url":"https://api.github.com/repos/katanoZ/project-cards-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/katanoZ/project-cards-app/merges","archive_url":"https://api.github.com/repos/katanoZ/project-cards-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/katanoZ/project-cards-app/downloads","issues_url":"https://api.github.com/repos/katanoZ/project-cards-app/issues{/number}","pulls_url":"https://api.github.com/repos/katanoZ/project-cards-app/pulls{/number}","milestones_url":"https://api.github.com/repos/katanoZ/project-cards-app/milestones{/number}","notifications_url":"https://api.github.com/repos/katanoZ/project-cards-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/katanoZ/project-cards-app/labels{/name}","releases_url":"https://api.github.com/repos/katanoZ/project-cards-app/releases{/id}","deployments_url":"https://api.github.com/repos/katanoZ/project-cards-app/deployments","created_at":"2018-03-06T13:31:57Z","updated_at":"2018-04-01T06:20:19Z","pushed_at":"2018-04-01T07:08:25Z","git_url":"git://github.com/katanoZ/project-cards-app.git","ssh_url":"git@github.com:katanoZ/project-cards-app.git","clone_url":"https://github.com/katanoZ/project-cards-app.git","svn_url":"https://github.com/katanoZ/project-cards-app","homepage":null,"size":434,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":0,"open_issues":4,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/katanoZ/project-cards-app/pulls/21"},"html":{"href":"https://github.com/katanoZ/project-cards-app/pull/21"},"issue":{"href":"https://api.github.com/repos/katanoZ/project-cards-app/issues/21"},"comments":{"href":"https://api.github.com/repos/katanoZ/project-cards-app/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/katanoZ/project-cards-app/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/katanoZ/project-cards-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/katanoZ/project-cards-app/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/katanoZ/project-cards-app/statuses/39ce9958a184f0a0b780647d671a63b81007d94d"}},"author_association":"OWNER"}}
{"actor":{"display_login":"stivan622"}}