{"action":"created","comment":{"url":"https://api.github.com/repos/Ada-C10/TaskList/pulls/comments/221474873","pull_request_review_id":160130056,"id":221474873,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTQ3NDg3Mw==","diff_hunk":"@@ -0,0 +1,77 @@\n+# TASKS = [\n+#   'read POODR',\n+#   'grocery shopping',\n+#   'do laundry'\n+# ]\n+\n+class TasksController < ApplicationController\n+\n+  def index\n+    # @tasks = TASKS\n+    @tasks = Task.all\n+  end\n+\n+  def show\n+    task_id = params[:id].to_i\n+    @task = Task.find_by(id: task_id)\n+    if @task.nil?\n+      head :not_found\n+    end\n+  end\n+\n+  def new\n+    @task = Task.new\n+  end\n+\n+  def create\n+    @task = Task.new(task_params)\n+\n+    if @task.save\n+      redirect_to tasks_path\n+    else\n+      render :new\n+    end\n+  end\n+\n+  def edit\n+    @task = Task.find_by(id: params[:id])\n+  end","path":"app/controllers/tasks_controller.rb","position":38,"original_position":38,"commit_id":"878232e789645633cecbdecf3f84d73bb7e1e8dd","original_commit_id":"878232e789645633cecbdecf3f84d73bb7e1e8dd","user":{"login":"droberts-ada","id":21064499,"node_id":"MDQ6VXNlcjIxMDY0NDk5","avatar_url":"https://avatars1.githubusercontent.com/u/21064499?v=4","gravatar_id":"","url":"https://api.github.com/users/droberts-ada","html_url":"https://github.com/droberts-ada","followers_url":"https://api.github.com/users/droberts-ada/followers","following_url":"https://api.github.com/users/droberts-ada/following{/other_user}","gists_url":"https://api.github.com/users/droberts-ada/gists{/gist_id}","starred_url":"https://api.github.com/users/droberts-ada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/droberts-ada/subscriptions","organizations_url":"https://api.github.com/users/droberts-ada/orgs","repos_url":"https://api.github.com/users/droberts-ada/repos","events_url":"https://api.github.com/users/droberts-ada/events{/privacy}","received_events_url":"https://api.github.com/users/droberts-ada/received_events","type":"User","site_admin":false},"body":"What happens if the task isn't found? You should include error-handling code in all of these actions that look for a single task.","created_at":"2018-09-30T21:54:00Z","updated_at":"2018-09-30T21:55:29Z","html_url":"https://github.com/Ada-C10/TaskList/pull/42#discussion_r221474873","pull_request_url":"https://api.github.com/repos/Ada-C10/TaskList/pulls/42","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Ada-C10/TaskList/pulls/comments/221474873"},"html":{"href":"https://github.com/Ada-C10/TaskList/pull/42#discussion_r221474873"},"pull_request":{"href":"https://api.github.com/repos/Ada-C10/TaskList/pulls/42"}}},"pull_request":{"url":"https://api.github.com/repos/Ada-C10/TaskList/pulls/42","id":217792679,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE3NzkyNjc5","html_url":"https://github.com/Ada-C10/TaskList/pull/42","diff_url":"https://github.com/Ada-C10/TaskList/pull/42.diff","patch_url":"https://github.com/Ada-C10/TaskList/pull/42.patch","issue_url":"https://api.github.com/repos/Ada-C10/TaskList/issues/42","number":42,"state":"open","locked":false,"title":"Val - Edges - TaskList","user":{"login":"valgidzi","id":18450444,"node_id":"MDQ6VXNlcjE4NDUwNDQ0","avatar_url":"https://avatars2.githubusercontent.com/u/18450444?v=4","gravatar_id":"","url":"https://api.github.com/users/valgidzi","html_url":"https://github.com/valgidzi","followers_url":"https://api.github.com/users/valgidzi/followers","following_url":"https://api.github.com/users/valgidzi/following{/other_user}","gists_url":"https://api.github.com/users/valgidzi/gists{/gist_id}","starred_url":"https://api.github.com/users/valgidzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valgidzi/subscriptions","organizations_url":"https://api.github.com/users/valgidzi/orgs","repos_url":"https://api.github.com/users/valgidzi/repos","events_url":"https://api.github.com/users/valgidzi/events{/privacy}","received_events_url":"https://api.github.com/users/valgidzi/received_events","type":"User","site_admin":false},"body":"# Task List\r\nCongratulations! You're submitting your assignment!\r\n\r\n## Comprehension Questions\r\nQuestion | Answer\r\n:------------- | :-------------\r\nDescribe in your own words what the Model is doing in Rails | The model is acting as the database and storing data.\r\nDescribe in your own words what the Controller is doing in Rails | The Controller communicates with the View and the Model, and carries out the logic stored in its actions.\r\nDescribe in your own words what the View is doing in Rails | The view holds information about what will be displayed to the client when a response is sent.\r\nWhat is the purpose of using strong params? (i.e. the params method in the controller) | Using strong params keeps code DRY and helps increase security.\r\nHow are Rails migrations related to Rails models? | Rails migrations are used to alter the database schema in the Rails models. \r\nDescribe one area of Rails that are still unclear on | Overall, I understand what to do better than I understand why I should do it. I think I'm most unclear on how ActiveRecord works.\r\n","created_at":"2018-09-24T21:23:30Z","updated_at":"2018-09-30T21:55:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a204e8dbaa76f8f22bb9e136b5fb0e00f69f5d73","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Ada-C10/TaskList/pulls/42/commits","review_comments_url":"https://api.github.com/repos/Ada-C10/TaskList/pulls/42/comments","review_comment_url":"https://api.github.com/repos/Ada-C10/TaskList/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ada-C10/TaskList/issues/42/comments","statuses_url":"https://api.github.com/repos/Ada-C10/TaskList/statuses/878232e789645633cecbdecf3f84d73bb7e1e8dd","head":{"label":"valgidzi:master","ref":"master","sha":"878232e789645633cecbdecf3f84d73bb7e1e8dd","user":{"login":"valgidzi","id":18450444,"node_id":"MDQ6VXNlcjE4NDUwNDQ0","avatar_url":"https://avatars2.githubusercontent.com/u/18450444?v=4","gravatar_id":"","url":"https://api.github.com/users/valgidzi","html_url":"https://github.com/valgidzi","followers_url":"https://api.github.com/users/valgidzi/followers","following_url":"https://api.github.com/users/valgidzi/following{/other_user}","gists_url":"https://api.github.com/users/valgidzi/gists{/gist_id}","starred_url":"https://api.github.com/users/valgidzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valgidzi/subscriptions","organizations_url":"https://api.github.com/users/valgidzi/orgs","repos_url":"https://api.github.com/users/valgidzi/repos","events_url":"https://api.github.com/users/valgidzi/events{/privacy}","received_events_url":"https://api.github.com/users/valgidzi/received_events","type":"User","site_admin":false},"repo":{"id":149175155,"node_id":"MDEwOlJlcG9zaXRvcnkxNDkxNzUxNTU=","name":"TaskList","full_name":"valgidzi/TaskList","private":false,"owner":{"login":"valgidzi","id":18450444,"node_id":"MDQ6VXNlcjE4NDUwNDQ0","avatar_url":"https://avatars2.githubusercontent.com/u/18450444?v=4","gravatar_id":"","url":"https://api.github.com/users/valgidzi","html_url":"https://github.com/valgidzi","followers_url":"https://api.github.com/users/valgidzi/followers","following_url":"https://api.github.com/users/valgidzi/following{/other_user}","gists_url":"https://api.github.com/users/valgidzi/gists{/gist_id}","starred_url":"https://api.github.com/users/valgidzi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valgidzi/subscriptions","organizations_url":"https://api.github.com/users/valgidzi/orgs","repos_url":"https://api.github.com/users/valgidzi/repos","events_url":"https://api.github.com/users/valgidzi/events{/privacy}","received_events_url":"https://api.github.com/users/valgidzi/received_events","type":"User","site_admin":false},"html_url":"https://github.com/valgidzi/TaskList","description":null,"fork":true,"url":"https://api.github.com/repos/valgidzi/TaskList","forks_url":"https://api.github.com/repos/valgidzi/TaskList/forks","keys_url":"https://api.github.com/repos/valgidzi/TaskList/keys{/key_id}","collaborators_url":"https://api.github.com/repos/valgidzi/TaskList/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/valgidzi/TaskList/teams","hooks_url":"https://api.github.com/repos/valgidzi/TaskList/hooks","issue_events_url":"https://api.github.com/repos/valgidzi/TaskList/issues/events{/number}","events_url":"https://api.github.com/repos/valgidzi/TaskList/events","assignees_url":"https://api.github.com/repos/valgidzi/TaskList/assignees{/user}","branches_url":"https://api.github.com/repos/valgidzi/TaskList/branches{/branch}","tags_url":"https://api.github.com/repos/valgidzi/TaskList/tags","blobs_url":"https://api.github.com/repos/valgidzi/TaskList/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/valgidzi/TaskList/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/valgidzi/TaskList/git/refs{/sha}","trees_url":"https://api.github.com/repos/valgidzi/TaskList/git/trees{/sha}","statuses_url":"https://api.github.com/repos/valgidzi/TaskList/statuses/{sha}","languages_url":"https://api.github.com/repos/valgidzi/TaskList/languages","stargazers_url":"https://api.github.com/repos/valgidzi/TaskList/stargazers","contributors_url":"https://api.github.com/repos/valgidzi/TaskList/contributors","subscribers_url":"https://api.github.com/repos/valgidzi/TaskList/subscribers","subscription_url":"https://api.github.com/repos/valgidzi/TaskList/subscription","commits_url":"https://api.github.com/repos/valgidzi/TaskList/commits{/sha}","git_commits_url":"https://api.github.com/repos/valgidzi/TaskList/git/commits{/sha}","comments_url":"https://api.github.com/repos/valgidzi/TaskList/comments{/number}","issue_comment_url":"https://api.github.com/repos/valgidzi/TaskList/issues/comments{/number}","contents_url":"https://api.github.com/repos/valgidzi/TaskList/contents/{+path}","compare_url":"https://api.github.com/repos/valgidzi/TaskList/compare/{base}...{head}","merges_url":"https://api.github.com/repos/valgidzi/TaskList/merges","archive_url":"https://api.github.com/repos/valgidzi/TaskList/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/valgidzi/TaskList/downloads","issues_url":"https://api.github.com/repos/valgidzi/TaskList/issues{/number}","pulls_url":"https://api.github.com/repos/valgidzi/TaskList/pulls{/number}","milestones_url":"https://api.github.com/repos/valgidzi/TaskList/milestones{/number}","notifications_url":"https://api.github.com/repos/valgidzi/TaskList/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/valgidzi/TaskList/labels{/name}","releases_url":"https://api.github.com/repos/valgidzi/TaskList/releases{/id}","deployments_url":"https://api.github.com/repos/valgidzi/TaskList/deployments","created_at":"2018-09-17T19:11:32Z","updated_at":"2018-09-28T23:06:53Z","pushed_at":"2018-09-28T23:06:51Z","git_url":"git://github.com/valgidzi/TaskList.git","ssh_url":"git@github.com:valgidzi/TaskList.git","clone_url":"https://github.com/valgidzi/TaskList.git","svn_url":"https://github.com/valgidzi/TaskList","homepage":null,"size":179,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Ada-C10:master","ref":"master","sha":"1119bef997e81720e09c850ed31a4155f397d2ee","user":{"login":"Ada-C10","id":40303054,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMzAzMDU0","avatar_url":"https://avatars0.githubusercontent.com/u/40303054?v=4","gravatar_id":"","url":"https://api.github.com/users/Ada-C10","html_url":"https://github.com/Ada-C10","followers_url":"https://api.github.com/users/Ada-C10/followers","following_url":"https://api.github.com/users/Ada-C10/following{/other_user}","gists_url":"https://api.github.com/users/Ada-C10/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-C10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-C10/subscriptions","organizations_url":"https://api.github.com/users/Ada-C10/orgs","repos_url":"https://api.github.com/users/Ada-C10/repos","events_url":"https://api.github.com/users/Ada-C10/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-C10/received_events","type":"Organization","site_admin":false},"repo":{"id":149150713,"node_id":"MDEwOlJlcG9zaXRvcnkxNDkxNTA3MTM=","name":"TaskList","full_name":"Ada-C10/TaskList","private":false,"owner":{"login":"Ada-C10","id":40303054,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMzAzMDU0","avatar_url":"https://avatars0.githubusercontent.com/u/40303054?v=4","gravatar_id":"","url":"https://api.github.com/users/Ada-C10","html_url":"https://github.com/Ada-C10","followers_url":"https://api.github.com/users/Ada-C10/followers","following_url":"https://api.github.com/users/Ada-C10/following{/other_user}","gists_url":"https://api.github.com/users/Ada-C10/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-C10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-C10/subscriptions","organizations_url":"https://api.github.com/users/Ada-C10/orgs","repos_url":"https://api.github.com/users/Ada-C10/repos","events_url":"https://api.github.com/users/Ada-C10/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-C10/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Ada-C10/TaskList","description":null,"fork":true,"url":"https://api.github.com/repos/Ada-C10/TaskList","forks_url":"https://api.github.com/repos/Ada-C10/TaskList/forks","keys_url":"https://api.github.com/repos/Ada-C10/TaskList/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ada-C10/TaskList/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ada-C10/TaskList/teams","hooks_url":"https://api.github.com/repos/Ada-C10/TaskList/hooks","issue_events_url":"https://api.github.com/repos/Ada-C10/TaskList/issues/events{/number}","events_url":"https://api.github.com/repos/Ada-C10/TaskList/events","assignees_url":"https://api.github.com/repos/Ada-C10/TaskList/assignees{/user}","branches_url":"https://api.github.com/repos/Ada-C10/TaskList/branches{/branch}","tags_url":"https://api.github.com/repos/Ada-C10/TaskList/tags","blobs_url":"https://api.github.com/repos/Ada-C10/TaskList/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ada-C10/TaskList/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ada-C10/TaskList/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ada-C10/TaskList/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ada-C10/TaskList/statuses/{sha}","languages_url":"https://api.github.com/repos/Ada-C10/TaskList/languages","stargazers_url":"https://api.github.com/repos/Ada-C10/TaskList/stargazers","contributors_url":"https://api.github.com/repos/Ada-C10/TaskList/contributors","subscribers_url":"https://api.github.com/repos/Ada-C10/TaskList/subscribers","subscription_url":"https://api.github.com/repos/Ada-C10/TaskList/subscription","commits_url":"https://api.github.com/repos/Ada-C10/TaskList/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ada-C10/TaskList/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ada-C10/TaskList/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ada-C10/TaskList/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ada-C10/TaskList/contents/{+path}","compare_url":"https://api.github.com/repos/Ada-C10/TaskList/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ada-C10/TaskList/merges","archive_url":"https://api.github.com/repos/Ada-C10/TaskList/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ada-C10/TaskList/downloads","issues_url":"https://api.github.com/repos/Ada-C10/TaskList/issues{/number}","pulls_url":"https://api.github.com/repos/Ada-C10/TaskList/pulls{/number}","milestones_url":"https://api.github.com/repos/Ada-C10/TaskList/milestones{/number}","notifications_url":"https://api.github.com/repos/Ada-C10/TaskList/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ada-C10/TaskList/labels{/name}","releases_url":"https://api.github.com/repos/Ada-C10/TaskList/releases{/id}","deployments_url":"https://api.github.com/repos/Ada-C10/TaskList/deployments","created_at":"2018-09-17T15:56:00Z","updated_at":"2018-09-21T16:04:34Z","pushed_at":"2018-09-30T16:25:09Z","git_url":"git://github.com/Ada-C10/TaskList.git","ssh_url":"git@github.com:Ada-C10/TaskList.git","clone_url":"https://github.com/Ada-C10/TaskList.git","svn_url":"https://github.com/Ada-C10/TaskList","homepage":null,"size":138,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":48,"mirror_url":null,"archived":false,"open_issues_count":48,"license":null,"forks":48,"open_issues":48,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ada-C10/TaskList/pulls/42"},"html":{"href":"https://github.com/Ada-C10/TaskList/pull/42"},"issue":{"href":"https://api.github.com/repos/Ada-C10/TaskList/issues/42"},"comments":{"href":"https://api.github.com/repos/Ada-C10/TaskList/issues/42/comments"},"review_comments":{"href":"https://api.github.com/repos/Ada-C10/TaskList/pulls/42/comments"},"review_comment":{"href":"https://api.github.com/repos/Ada-C10/TaskList/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ada-C10/TaskList/pulls/42/commits"},"statuses":{"href":"https://api.github.com/repos/Ada-C10/TaskList/statuses/878232e789645633cecbdecf3f84d73bb7e1e8dd"}},"author_association":"NONE"}}
{"actor":{"display_login":"droberts-ada"}}