{"action":"created","comment":{"url":"https://api.github.com/repos/we-b/checklist_app/pulls/comments/45555671","id":45555671,"diff_hunk":"@@ -1,8 +1,67 @@\n class ChecklistsController < ApplicationController\n+  protect_from_forgery except: [:destroy]\n+  before_action :set_checklist, only: [:edit, :update, :destroy, :show]\n \n   def index\n     @checklists = Checklist.all.order(done: :ASC).page(params[:page])\n     Checklist.check_all_checklists(@checklists)\n-    flash[:alert] = '本日未チェックのチェックリストがあります。' if Checklist.check_flash(@checklists)\n+    flash.now[:alert] = '本日未チェックのチェックリストがあります。' if Checklist.check_flash(@checklists)\n   end\n+\n+  def new\n+    @checklist = Checklist.new\n+    @contents = @checklist.contents.build\n+  end\n+\n+  def show\n+    @contents = @checklist.contents","path":"app/controllers/checklists_controller.rb","position":18,"original_position":18,"commit_id":"e919c4bd6361f88e901cb0657ae71e91cfbb56ba","original_commit_id":"e919c4bd6361f88e901cb0657ae71e91cfbb56ba","user":{"login":"NaokiMochizuki","id":12856100,"avatar_url":"https://avatars.githubusercontent.com/u/12856100?v=3","gravatar_id":"","url":"https://api.github.com/users/NaokiMochizuki","html_url":"https://github.com/NaokiMochizuki","followers_url":"https://api.github.com/users/NaokiMochizuki/followers","following_url":"https://api.github.com/users/NaokiMochizuki/following{/other_user}","gists_url":"https://api.github.com/users/NaokiMochizuki/gists{/gist_id}","starred_url":"https://api.github.com/users/NaokiMochizuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NaokiMochizuki/subscriptions","organizations_url":"https://api.github.com/users/NaokiMochizuki/orgs","repos_url":"https://api.github.com/users/NaokiMochizuki/repos","events_url":"https://api.github.com/users/NaokiMochizuki/events{/privacy}","received_events_url":"https://api.github.com/users/NaokiMochizuki/received_events","type":"User","site_admin":false},"body":"コントローラーでの表記を消して、\r\nview側で、\r\n@contents.each do   → @checklist.contents.each do  に変更して対応しました。","created_at":"2015-11-22T08:07:00Z","updated_at":"2015-11-22T08:07:00Z","html_url":"https://github.com/we-b/checklist_app/pull/2#discussion_r45555671","pull_request_url":"https://api.github.com/repos/we-b/checklist_app/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/we-b/checklist_app/pulls/comments/45555671"},"html":{"href":"https://github.com/we-b/checklist_app/pull/2#discussion_r45555671"},"pull_request":{"href":"https://api.github.com/repos/we-b/checklist_app/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/we-b/checklist_app/pulls/2","id":49935782,"html_url":"https://github.com/we-b/checklist_app/pull/2","diff_url":"https://github.com/we-b/checklist_app/pull/2.diff","patch_url":"https://github.com/we-b/checklist_app/pull/2.patch","issue_url":"https://api.github.com/repos/we-b/checklist_app/issues/2","number":2,"state":"open","locked":false,"title":"Create & Edit,Destroy checklist function","user":{"login":"NaokiMochizuki","id":12856100,"avatar_url":"https://avatars.githubusercontent.com/u/12856100?v=3","gravatar_id":"","url":"https://api.github.com/users/NaokiMochizuki","html_url":"https://github.com/NaokiMochizuki","followers_url":"https://api.github.com/users/NaokiMochizuki/followers","following_url":"https://api.github.com/users/NaokiMochizuki/following{/other_user}","gists_url":"https://api.github.com/users/NaokiMochizuki/gists{/gist_id}","starred_url":"https://api.github.com/users/NaokiMochizuki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NaokiMochizuki/subscriptions","organizations_url":"https://api.github.com/users/NaokiMochizuki/orgs","repos_url":"https://api.github.com/users/NaokiMochizuki/repos","events_url":"https://api.github.com/users/NaokiMochizuki/events{/privacy}","received_events_url":"https://api.github.com/users/NaokiMochizuki/received_events","type":"User","site_admin":false},"body":"## What\r\nチェックリスト投稿機能の作成\r\n+\r\ncommit d7e0c2cb98b6ce2a18ad97478a108d3e98a65621 以降\r\nチェックリスト詳細ページより編集・削除が出来るよう実装\r\n\r\n## Why\r\n自作のチェックリストを作成する為\r\n+\r\ncommit d7e0c2cb98b6ce2a18ad97478a108d3e98a65621 以降\r\n柔軟な項目の追加・削除を行い、チェックリストを使いやすくする為","created_at":"2015-11-06T10:09:10Z","updated_at":"2015-11-22T08:07:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c755928a30b61f2cc5d9cf60218b7828c5b7fccf","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/we-b/checklist_app/pulls/2/commits","review_comments_url":"https://api.github.com/repos/we-b/checklist_app/pulls/2/comments","review_comment_url":"https://api.github.com/repos/we-b/checklist_app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/we-b/checklist_app/issues/2/comments","statuses_url":"https://api.github.com/repos/we-b/checklist_app/statuses/e919c4bd6361f88e901cb0657ae71e91cfbb56ba","head":{"label":"we-b:create_checklist_function","ref":"create_checklist_function","sha":"e919c4bd6361f88e901cb0657ae71e91cfbb56ba","user":{"login":"we-b","id":3305403,"avatar_url":"https://avatars.githubusercontent.com/u/3305403?v=3","gravatar_id":"","url":"https://api.github.com/users/we-b","html_url":"https://github.com/we-b","followers_url":"https://api.github.com/users/we-b/followers","following_url":"https://api.github.com/users/we-b/following{/other_user}","gists_url":"https://api.github.com/users/we-b/gists{/gist_id}","starred_url":"https://api.github.com/users/we-b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/we-b/subscriptions","organizations_url":"https://api.github.com/users/we-b/orgs","repos_url":"https://api.github.com/users/we-b/repos","events_url":"https://api.github.com/users/we-b/events{/privacy}","received_events_url":"https://api.github.com/users/we-b/received_events","type":"Organization","site_admin":false},"repo":{"id":44587748,"name":"checklist_app","full_name":"we-b/checklist_app","owner":{"login":"we-b","id":3305403,"avatar_url":"https://avatars.githubusercontent.com/u/3305403?v=3","gravatar_id":"","url":"https://api.github.com/users/we-b","html_url":"https://github.com/we-b","followers_url":"https://api.github.com/users/we-b/followers","following_url":"https://api.github.com/users/we-b/following{/other_user}","gists_url":"https://api.github.com/users/we-b/gists{/gist_id}","starred_url":"https://api.github.com/users/we-b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/we-b/subscriptions","organizations_url":"https://api.github.com/users/we-b/orgs","repos_url":"https://api.github.com/users/we-b/repos","events_url":"https://api.github.com/users/we-b/events{/privacy}","received_events_url":"https://api.github.com/users/we-b/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/we-b/checklist_app","description":"","fork":false,"url":"https://api.github.com/repos/we-b/checklist_app","forks_url":"https://api.github.com/repos/we-b/checklist_app/forks","keys_url":"https://api.github.com/repos/we-b/checklist_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/we-b/checklist_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/we-b/checklist_app/teams","hooks_url":"https://api.github.com/repos/we-b/checklist_app/hooks","issue_events_url":"https://api.github.com/repos/we-b/checklist_app/issues/events{/number}","events_url":"https://api.github.com/repos/we-b/checklist_app/events","assignees_url":"https://api.github.com/repos/we-b/checklist_app/assignees{/user}","branches_url":"https://api.github.com/repos/we-b/checklist_app/branches{/branch}","tags_url":"https://api.github.com/repos/we-b/checklist_app/tags","blobs_url":"https://api.github.com/repos/we-b/checklist_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/we-b/checklist_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/we-b/checklist_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/we-b/checklist_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/we-b/checklist_app/statuses/{sha}","languages_url":"https://api.github.com/repos/we-b/checklist_app/languages","stargazers_url":"https://api.github.com/repos/we-b/checklist_app/stargazers","contributors_url":"https://api.github.com/repos/we-b/checklist_app/contributors","subscribers_url":"https://api.github.com/repos/we-b/checklist_app/subscribers","subscription_url":"https://api.github.com/repos/we-b/checklist_app/subscription","commits_url":"https://api.github.com/repos/we-b/checklist_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/we-b/checklist_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/we-b/checklist_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/we-b/checklist_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/we-b/checklist_app/contents/{+path}","compare_url":"https://api.github.com/repos/we-b/checklist_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/we-b/checklist_app/merges","archive_url":"https://api.github.com/repos/we-b/checklist_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/we-b/checklist_app/downloads","issues_url":"https://api.github.com/repos/we-b/checklist_app/issues{/number}","pulls_url":"https://api.github.com/repos/we-b/checklist_app/pulls{/number}","milestones_url":"https://api.github.com/repos/we-b/checklist_app/milestones{/number}","notifications_url":"https://api.github.com/repos/we-b/checklist_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/we-b/checklist_app/labels{/name}","releases_url":"https://api.github.com/repos/we-b/checklist_app/releases{/id}","created_at":"2015-10-20T06:51:28Z","updated_at":"2015-10-22T04:47:08Z","pushed_at":"2015-11-20T14:00:35Z","git_url":"git://github.com/we-b/checklist_app.git","ssh_url":"git@github.com:we-b/checklist_app.git","clone_url":"https://github.com/we-b/checklist_app.git","svn_url":"https://github.com/we-b/checklist_app","homepage":null,"size":108,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"we-b:master","ref":"master","sha":"bda3d24835fa75264859541961c1144005b62d72","user":{"login":"we-b","id":3305403,"avatar_url":"https://avatars.githubusercontent.com/u/3305403?v=3","gravatar_id":"","url":"https://api.github.com/users/we-b","html_url":"https://github.com/we-b","followers_url":"https://api.github.com/users/we-b/followers","following_url":"https://api.github.com/users/we-b/following{/other_user}","gists_url":"https://api.github.com/users/we-b/gists{/gist_id}","starred_url":"https://api.github.com/users/we-b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/we-b/subscriptions","organizations_url":"https://api.github.com/users/we-b/orgs","repos_url":"https://api.github.com/users/we-b/repos","events_url":"https://api.github.com/users/we-b/events{/privacy}","received_events_url":"https://api.github.com/users/we-b/received_events","type":"Organization","site_admin":false},"repo":{"id":44587748,"name":"checklist_app","full_name":"we-b/checklist_app","owner":{"login":"we-b","id":3305403,"avatar_url":"https://avatars.githubusercontent.com/u/3305403?v=3","gravatar_id":"","url":"https://api.github.com/users/we-b","html_url":"https://github.com/we-b","followers_url":"https://api.github.com/users/we-b/followers","following_url":"https://api.github.com/users/we-b/following{/other_user}","gists_url":"https://api.github.com/users/we-b/gists{/gist_id}","starred_url":"https://api.github.com/users/we-b/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/we-b/subscriptions","organizations_url":"https://api.github.com/users/we-b/orgs","repos_url":"https://api.github.com/users/we-b/repos","events_url":"https://api.github.com/users/we-b/events{/privacy}","received_events_url":"https://api.github.com/users/we-b/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/we-b/checklist_app","description":"","fork":false,"url":"https://api.github.com/repos/we-b/checklist_app","forks_url":"https://api.github.com/repos/we-b/checklist_app/forks","keys_url":"https://api.github.com/repos/we-b/checklist_app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/we-b/checklist_app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/we-b/checklist_app/teams","hooks_url":"https://api.github.com/repos/we-b/checklist_app/hooks","issue_events_url":"https://api.github.com/repos/we-b/checklist_app/issues/events{/number}","events_url":"https://api.github.com/repos/we-b/checklist_app/events","assignees_url":"https://api.github.com/repos/we-b/checklist_app/assignees{/user}","branches_url":"https://api.github.com/repos/we-b/checklist_app/branches{/branch}","tags_url":"https://api.github.com/repos/we-b/checklist_app/tags","blobs_url":"https://api.github.com/repos/we-b/checklist_app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/we-b/checklist_app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/we-b/checklist_app/git/refs{/sha}","trees_url":"https://api.github.com/repos/we-b/checklist_app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/we-b/checklist_app/statuses/{sha}","languages_url":"https://api.github.com/repos/we-b/checklist_app/languages","stargazers_url":"https://api.github.com/repos/we-b/checklist_app/stargazers","contributors_url":"https://api.github.com/repos/we-b/checklist_app/contributors","subscribers_url":"https://api.github.com/repos/we-b/checklist_app/subscribers","subscription_url":"https://api.github.com/repos/we-b/checklist_app/subscription","commits_url":"https://api.github.com/repos/we-b/checklist_app/commits{/sha}","git_commits_url":"https://api.github.com/repos/we-b/checklist_app/git/commits{/sha}","comments_url":"https://api.github.com/repos/we-b/checklist_app/comments{/number}","issue_comment_url":"https://api.github.com/repos/we-b/checklist_app/issues/comments{/number}","contents_url":"https://api.github.com/repos/we-b/checklist_app/contents/{+path}","compare_url":"https://api.github.com/repos/we-b/checklist_app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/we-b/checklist_app/merges","archive_url":"https://api.github.com/repos/we-b/checklist_app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/we-b/checklist_app/downloads","issues_url":"https://api.github.com/repos/we-b/checklist_app/issues{/number}","pulls_url":"https://api.github.com/repos/we-b/checklist_app/pulls{/number}","milestones_url":"https://api.github.com/repos/we-b/checklist_app/milestones{/number}","notifications_url":"https://api.github.com/repos/we-b/checklist_app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/we-b/checklist_app/labels{/name}","releases_url":"https://api.github.com/repos/we-b/checklist_app/releases{/id}","created_at":"2015-10-20T06:51:28Z","updated_at":"2015-10-22T04:47:08Z","pushed_at":"2015-11-20T14:00:35Z","git_url":"git://github.com/we-b/checklist_app.git","ssh_url":"git@github.com:we-b/checklist_app.git","clone_url":"https://github.com/we-b/checklist_app.git","svn_url":"https://github.com/we-b/checklist_app","homepage":null,"size":108,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/we-b/checklist_app/pulls/2"},"html":{"href":"https://github.com/we-b/checklist_app/pull/2"},"issue":{"href":"https://api.github.com/repos/we-b/checklist_app/issues/2"},"comments":{"href":"https://api.github.com/repos/we-b/checklist_app/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/we-b/checklist_app/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/we-b/checklist_app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/we-b/checklist_app/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/we-b/checklist_app/statuses/e919c4bd6361f88e901cb0657ae71e91cfbb56ba"}}}}