{"action":"created","comment":{"url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/pulls/comments/78878414","id":78878414,"diff_hunk":"@@ -0,0 +1,18 @@\n+class FavoritesController < ApplicationController\n+\n+\tdef favorite\n+\t\t@micropost = Micropost.find(params[:micropost_id])","path":"app/controllers/favorites_controller.rb","position":4,"original_position":4,"commit_id":"b1f8110d40cefad48b43f984f377fcf6449522de","original_commit_id":"b1f8110d40cefad48b43f984f377fcf6449522de","user":{"login":"dkakinoki","id":8498214,"avatar_url":"https://avatars.githubusercontent.com/u/8498214?v=3","gravatar_id":"","url":"https://api.github.com/users/dkakinoki","html_url":"https://github.com/dkakinoki","followers_url":"https://api.github.com/users/dkakinoki/followers","following_url":"https://api.github.com/users/dkakinoki/following{/other_user}","gists_url":"https://api.github.com/users/dkakinoki/gists{/gist_id}","starred_url":"https://api.github.com/users/dkakinoki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkakinoki/subscriptions","organizations_url":"https://api.github.com/users/dkakinoki/orgs","repos_url":"https://api.github.com/users/dkakinoki/repos","events_url":"https://api.github.com/users/dkakinoki/events{/privacy}","received_events_url":"https://api.github.com/users/dkakinoki/received_events","type":"User","site_admin":false},"body":"多分インデントがタブになっているので、半角でそろえましょう。もし設定が入っていなければ、タブを押しても半角スペースが入るようにエディタで設定しておくとよいと思います。","created_at":"2016-09-15T02:03:17Z","updated_at":"2016-09-15T02:03:17Z","html_url":"https://github.com/ryoide/sample_app_3rd_edition/pull/3#discussion_r78878414","pull_request_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/pulls/comments/78878414"},"html":{"href":"https://github.com/ryoide/sample_app_3rd_edition/pull/3#discussion_r78878414"},"pull_request":{"href":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/pulls/3","id":85194941,"html_url":"https://github.com/ryoide/sample_app_3rd_edition/pull/3","diff_url":"https://github.com/ryoide/sample_app_3rd_edition/pull/3.diff","patch_url":"https://github.com/ryoide/sample_app_3rd_edition/pull/3.patch","issue_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/issues/3","number":3,"state":"open","locked":false,"title":"お気に入り機能追加","user":{"login":"ryoide","id":9944421,"avatar_url":"https://avatars.githubusercontent.com/u/9944421?v=3","gravatar_id":"","url":"https://api.github.com/users/ryoide","html_url":"https://github.com/ryoide","followers_url":"https://api.github.com/users/ryoide/followers","following_url":"https://api.github.com/users/ryoide/following{/other_user}","gists_url":"https://api.github.com/users/ryoide/gists{/gist_id}","starred_url":"https://api.github.com/users/ryoide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryoide/subscriptions","organizations_url":"https://api.github.com/users/ryoide/orgs","repos_url":"https://api.github.com/users/ryoide/repos","events_url":"https://api.github.com/users/ryoide/events{/privacy}","received_events_url":"https://api.github.com/users/ryoide/received_events","type":"User","site_admin":false},"body":"##概要\r\nお気に入り機能を実装いたしました。\r\n・以下の画像のようにmicropostに「お気に入りする」ボタンを追加致しました。\r\n<img width=\"797\" alt=\"2016-09-14 18 08 44\" src=\"https://cloud.githubusercontent.com/assets/9944421/18506314/6c5327c4-7aa6-11e6-95fe-9f916b372b50.png\">\r\n・「お気に入りする」ボタンを押すと、ページ遷移せずに以下の画像のように「お気に入りを取り消す」ボタンに変わるよう変更致しました。\r\n<img width=\"784\" alt=\"2016-09-14 18 13 28\" src=\"https://cloud.githubusercontent.com/assets/9944421/18506411/fa9eea40-7aa6-11e6-8bdb-02ef9ca98100.png\">\r\n・ヘッダーのAccountからFavoriteを押すと、自分のお気に入りしたmicropostが見れるページへ遷移致します。\r\n<img width=\"1248\" alt=\"2016-09-14 18 17 11\" src=\"https://cloud.githubusercontent.com/assets/9944421/18506551/8a347d6e-7aa7-11e6-9987-faf9fb92c001.png\">\r\n<img width=\"838\" alt=\"2016-09-14 18 17 32\" src=\"https://cloud.githubusercontent.com/assets/9944421/18506556/93d02864-7aa7-11e6-9881-d177f69f334d.png\">\r\n\r\n##技術的変更点\r\nどのuserがどのmicropostをお気に入りしたかを保存するために新しくfavoriteモデルを作成しました。\r\n「お気に入り」ボタンが押されたらfavoriteが生成、保存され、「お気に入りを取り消す」ボタンでfavoriteが削除される仕様になっています。\r\nお気に入りをした時、ページ遷移をしないようにするために、Ajaxを使用いたしました。\r\n\r\n##デザイン変更点\r\n・各micropostに「お気に入り」ボタンを設置しました。\r\n・userのお気に入りのmicropostが見れるページを追加しました。\r\n\r\n##テスト結果とテスト項目\r\n投稿をお気に入りして、ページ遷移せず、お気に入りを取り消すに変わります。\r\n反対に、お気に入りを消すを押すと、ページ遷移せずお気に入りに変わります。\r\nヘッダーのAccount>Favoriteで自分のお気に入りしたmicropostが見れる画面に遷移します。\r\n\r\n以上、よろしくお願い致します。","created_at":"2016-09-14T09:32:41Z","updated_at":"2016-09-15T02:03:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03923d953ac307f4ea5ed643385509bee05365a7","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/pulls/3/commits","review_comments_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/pulls/3/comments","review_comment_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/issues/3/comments","statuses_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/statuses/b1f8110d40cefad48b43f984f377fcf6449522de","head":{"label":"ryoide:function3","ref":"function3","sha":"b1f8110d40cefad48b43f984f377fcf6449522de","user":{"login":"ryoide","id":9944421,"avatar_url":"https://avatars.githubusercontent.com/u/9944421?v=3","gravatar_id":"","url":"https://api.github.com/users/ryoide","html_url":"https://github.com/ryoide","followers_url":"https://api.github.com/users/ryoide/followers","following_url":"https://api.github.com/users/ryoide/following{/other_user}","gists_url":"https://api.github.com/users/ryoide/gists{/gist_id}","starred_url":"https://api.github.com/users/ryoide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryoide/subscriptions","organizations_url":"https://api.github.com/users/ryoide/orgs","repos_url":"https://api.github.com/users/ryoide/repos","events_url":"https://api.github.com/users/ryoide/events{/privacy}","received_events_url":"https://api.github.com/users/ryoide/received_events","type":"User","site_admin":false},"repo":{"id":68065752,"name":"sample_app_3rd_edition","full_name":"ryoide/sample_app_3rd_edition","owner":{"login":"ryoide","id":9944421,"avatar_url":"https://avatars.githubusercontent.com/u/9944421?v=3","gravatar_id":"","url":"https://api.github.com/users/ryoide","html_url":"https://github.com/ryoide","followers_url":"https://api.github.com/users/ryoide/followers","following_url":"https://api.github.com/users/ryoide/following{/other_user}","gists_url":"https://api.github.com/users/ryoide/gists{/gist_id}","starred_url":"https://api.github.com/users/ryoide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryoide/subscriptions","organizations_url":"https://api.github.com/users/ryoide/orgs","repos_url":"https://api.github.com/users/ryoide/repos","events_url":"https://api.github.com/users/ryoide/events{/privacy}","received_events_url":"https://api.github.com/users/ryoide/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryoide/sample_app_3rd_edition","description":"The sample app for the 3rd edition of the Ruby on Rails Tutorial","fork":true,"url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition","forks_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/forks","keys_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/teams","hooks_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/hooks","issue_events_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/issues/events{/number}","events_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/events","assignees_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/assignees{/user}","branches_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/branches{/branch}","tags_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/tags","blobs_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/statuses/{sha}","languages_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/languages","stargazers_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/stargazers","contributors_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/contributors","subscribers_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/subscribers","subscription_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/subscription","commits_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/contents/{+path}","compare_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/merges","archive_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/downloads","issues_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/issues{/number}","pulls_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/pulls{/number}","milestones_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/milestones{/number}","notifications_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/labels{/name}","releases_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/releases{/id}","deployments_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/deployments","created_at":"2016-09-13T02:15:22Z","updated_at":"2016-09-13T02:15:23Z","pushed_at":"2016-09-14T12:50:29Z","git_url":"git://github.com/ryoide/sample_app_3rd_edition.git","ssh_url":"git@github.com:ryoide/sample_app_3rd_edition.git","clone_url":"https://github.com/ryoide/sample_app_3rd_edition.git","svn_url":"https://github.com/ryoide/sample_app_3rd_edition","homepage":null,"size":39448,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"ryoide:master","ref":"master","sha":"7a88c7cd09f39ffd94809b3722695bf94408d661","user":{"login":"ryoide","id":9944421,"avatar_url":"https://avatars.githubusercontent.com/u/9944421?v=3","gravatar_id":"","url":"https://api.github.com/users/ryoide","html_url":"https://github.com/ryoide","followers_url":"https://api.github.com/users/ryoide/followers","following_url":"https://api.github.com/users/ryoide/following{/other_user}","gists_url":"https://api.github.com/users/ryoide/gists{/gist_id}","starred_url":"https://api.github.com/users/ryoide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryoide/subscriptions","organizations_url":"https://api.github.com/users/ryoide/orgs","repos_url":"https://api.github.com/users/ryoide/repos","events_url":"https://api.github.com/users/ryoide/events{/privacy}","received_events_url":"https://api.github.com/users/ryoide/received_events","type":"User","site_admin":false},"repo":{"id":68065752,"name":"sample_app_3rd_edition","full_name":"ryoide/sample_app_3rd_edition","owner":{"login":"ryoide","id":9944421,"avatar_url":"https://avatars.githubusercontent.com/u/9944421?v=3","gravatar_id":"","url":"https://api.github.com/users/ryoide","html_url":"https://github.com/ryoide","followers_url":"https://api.github.com/users/ryoide/followers","following_url":"https://api.github.com/users/ryoide/following{/other_user}","gists_url":"https://api.github.com/users/ryoide/gists{/gist_id}","starred_url":"https://api.github.com/users/ryoide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryoide/subscriptions","organizations_url":"https://api.github.com/users/ryoide/orgs","repos_url":"https://api.github.com/users/ryoide/repos","events_url":"https://api.github.com/users/ryoide/events{/privacy}","received_events_url":"https://api.github.com/users/ryoide/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryoide/sample_app_3rd_edition","description":"The sample app for the 3rd edition of the Ruby on Rails Tutorial","fork":true,"url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition","forks_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/forks","keys_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/teams","hooks_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/hooks","issue_events_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/issues/events{/number}","events_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/events","assignees_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/assignees{/user}","branches_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/branches{/branch}","tags_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/tags","blobs_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/statuses/{sha}","languages_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/languages","stargazers_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/stargazers","contributors_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/contributors","subscribers_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/subscribers","subscription_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/subscription","commits_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/contents/{+path}","compare_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/merges","archive_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/downloads","issues_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/issues{/number}","pulls_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/pulls{/number}","milestones_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/milestones{/number}","notifications_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/labels{/name}","releases_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/releases{/id}","deployments_url":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/deployments","created_at":"2016-09-13T02:15:22Z","updated_at":"2016-09-13T02:15:23Z","pushed_at":"2016-09-14T12:50:29Z","git_url":"git://github.com/ryoide/sample_app_3rd_edition.git","ssh_url":"git@github.com:ryoide/sample_app_3rd_edition.git","clone_url":"https://github.com/ryoide/sample_app_3rd_edition.git","svn_url":"https://github.com/ryoide/sample_app_3rd_edition","homepage":null,"size":39448,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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/ryoide/sample_app_3rd_edition/pulls/3"},"html":{"href":"https://github.com/ryoide/sample_app_3rd_edition/pull/3"},"issue":{"href":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/issues/3"},"comments":{"href":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/ryoide/sample_app_3rd_edition/statuses/b1f8110d40cefad48b43f984f377fcf6449522de"}}}}
{"actor":{"display_login":"dkakinoki"}}