{"action":"created","comment":{"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/comments/34951414","id":34951414,"diff_hunk":"@@ -1,80 +1,133 @@\n class TasksController < ApplicationController\n \n   def index\n-    @all_tasks = Task.all   # NOTE TO SELF: \"task\" is actually a Task::ActiveRecord_Relation object, but responds to Array methods\n-    completed_instance_var\n+    @all_tasks = Task.all\n+      # NOTE TO SELF: \"@all_tasks\" is actually a Task::ActiveRecord_Relation object, but responds to array methods\n \n-    render :index   # for clarity, you don't actually need this in this case\n+    render :index\n+      # NOTE TO SELF: this is for clarity, you don't actually need this in this case\n+  end\n+\n+  def completed_status\n+    @task = Task.find(params[:id])\n+    if @task[:completed_at].nil?\n+      Task.completed(params[:id])\n+    else\n+      Task.not_completed(params[:id])\n+    end\n+\n+    redirect_to \"/\"\n   end\n \n   def show\n-    task_instance_vars\n-    @visibility = \"invisible\"\n+    task = Task.find(params[:id])\n+\n+    @task_id =              task[:id]\n+    @task_name =            task[:name]\n+    @task_description =     task[:description]\n+    @task_status =          task[:completed_at].nil? ? \"NEED TO PLAY\" : \"FINISHED\"\n+    @task_completion_date = task[:completed_at].nil? ? \"N/A\" : date_format(task[:completed_at])\n+    @task_created_at =      date_format(task[:created_at])\n+    @task_updated_at =      date_format(task[:updated_at])\n+    @task_recommended_id =  task.person.id\n+    @task_recommended_by =  task.person.name\n+\n+    @button_visibility = \"visible\"","path":"app/controllers/tasks_controller.rb","position":40,"original_position":40,"commit_id":"d98696436b9d9589c7df30834b7dd5cdeb007c8b","original_commit_id":"d98696436b9d9589c7df30834b7dd5cdeb007c8b","user":{"login":"kariabancroft","id":7269204,"avatar_url":"https://avatars.githubusercontent.com/u/7269204?v=3","gravatar_id":"","url":"https://api.github.com/users/kariabancroft","html_url":"https://github.com/kariabancroft","followers_url":"https://api.github.com/users/kariabancroft/followers","following_url":"https://api.github.com/users/kariabancroft/following{/other_user}","gists_url":"https://api.github.com/users/kariabancroft/gists{/gist_id}","starred_url":"https://api.github.com/users/kariabancroft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kariabancroft/subscriptions","organizations_url":"https://api.github.com/users/kariabancroft/orgs","repos_url":"https://api.github.com/users/kariabancroft/repos","events_url":"https://api.github.com/users/kariabancroft/events{/privacy}","received_events_url":"https://api.github.com/users/kariabancroft/received_events","type":"User","site_admin":false},"body":"Same comment re: display functionality - you probably don't want to set this in the controller.","created_at":"2015-07-18T20:43:52Z","updated_at":"2015-07-18T20:43:52Z","html_url":"https://github.com/Ada-Developers-Academy/C3Projects--TaskListRails/pull/45#discussion_r34951414","pull_request_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/comments/34951414"},"html":{"href":"https://github.com/Ada-Developers-Academy/C3Projects--TaskListRails/pull/45#discussion_r34951414"},"pull_request":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/45","id":38200363,"html_url":"https://github.com/Ada-Developers-Academy/C3Projects--TaskListRails/pull/45","diff_url":"https://github.com/Ada-Developers-Academy/C3Projects--TaskListRails/pull/45.diff","patch_url":"https://github.com/Ada-Developers-Academy/C3Projects--TaskListRails/pull/45.patch","issue_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/issues/45","number":45,"state":"open","locked":false,"title":"TaskListRails (Wave 3 & Final Wave)","user":{"login":"QuartzBrandi","id":11002746,"avatar_url":"https://avatars.githubusercontent.com/u/11002746?v=3","gravatar_id":"","url":"https://api.github.com/users/QuartzBrandi","html_url":"https://github.com/QuartzBrandi","followers_url":"https://api.github.com/users/QuartzBrandi/followers","following_url":"https://api.github.com/users/QuartzBrandi/following{/other_user}","gists_url":"https://api.github.com/users/QuartzBrandi/gists{/gist_id}","starred_url":"https://api.github.com/users/QuartzBrandi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuartzBrandi/subscriptions","organizations_url":"https://api.github.com/users/QuartzBrandi/orgs","repos_url":"https://api.github.com/users/QuartzBrandi/repos","events_url":"https://api.github.com/users/QuartzBrandi/events{/privacy}","received_events_url":"https://api.github.com/users/QuartzBrandi/received_events","type":"User","site_admin":false},"body":"Here's my Wave 3 for TaskListRails. It's not very pretty to look at, I still need to clean up a lot of old code as it sort of evolved with the waves. Also, didn't get around to drying up my code for the form. One thing I noticed was that you don't need to params.permit if you send the params to the model and modify the database from there vs trying to modify the database in the controller; was curious why. Would have liked to pretty up the webpage.","created_at":"2015-06-22T05:02:02Z","updated_at":"2015-07-18T20:43:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a6f3e7f4e401307553c3fc38a80f153b4ce44c7f","assignee":{"login":"kariabancroft","id":7269204,"avatar_url":"https://avatars.githubusercontent.com/u/7269204?v=3","gravatar_id":"","url":"https://api.github.com/users/kariabancroft","html_url":"https://github.com/kariabancroft","followers_url":"https://api.github.com/users/kariabancroft/followers","following_url":"https://api.github.com/users/kariabancroft/following{/other_user}","gists_url":"https://api.github.com/users/kariabancroft/gists{/gist_id}","starred_url":"https://api.github.com/users/kariabancroft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kariabancroft/subscriptions","organizations_url":"https://api.github.com/users/kariabancroft/orgs","repos_url":"https://api.github.com/users/kariabancroft/repos","events_url":"https://api.github.com/users/kariabancroft/events{/privacy}","received_events_url":"https://api.github.com/users/kariabancroft/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/45/commits","review_comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/45/comments","review_comment_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/issues/45/comments","statuses_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/statuses/d98696436b9d9589c7df30834b7dd5cdeb007c8b","head":{"label":"QuartzBrandi:bew/master","ref":"bew/master","sha":"d98696436b9d9589c7df30834b7dd5cdeb007c8b","user":{"login":"QuartzBrandi","id":11002746,"avatar_url":"https://avatars.githubusercontent.com/u/11002746?v=3","gravatar_id":"","url":"https://api.github.com/users/QuartzBrandi","html_url":"https://github.com/QuartzBrandi","followers_url":"https://api.github.com/users/QuartzBrandi/followers","following_url":"https://api.github.com/users/QuartzBrandi/following{/other_user}","gists_url":"https://api.github.com/users/QuartzBrandi/gists{/gist_id}","starred_url":"https://api.github.com/users/QuartzBrandi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuartzBrandi/subscriptions","organizations_url":"https://api.github.com/users/QuartzBrandi/orgs","repos_url":"https://api.github.com/users/QuartzBrandi/repos","events_url":"https://api.github.com/users/QuartzBrandi/events{/privacy}","received_events_url":"https://api.github.com/users/QuartzBrandi/received_events","type":"User","site_admin":false},"repo":{"id":37612466,"name":"C3Projects--TaskListRails","full_name":"QuartzBrandi/C3Projects--TaskListRails","owner":{"login":"QuartzBrandi","id":11002746,"avatar_url":"https://avatars.githubusercontent.com/u/11002746?v=3","gravatar_id":"","url":"https://api.github.com/users/QuartzBrandi","html_url":"https://github.com/QuartzBrandi","followers_url":"https://api.github.com/users/QuartzBrandi/followers","following_url":"https://api.github.com/users/QuartzBrandi/following{/other_user}","gists_url":"https://api.github.com/users/QuartzBrandi/gists{/gist_id}","starred_url":"https://api.github.com/users/QuartzBrandi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuartzBrandi/subscriptions","organizations_url":"https://api.github.com/users/QuartzBrandi/orgs","repos_url":"https://api.github.com/users/QuartzBrandi/repos","events_url":"https://api.github.com/users/QuartzBrandi/events{/privacy}","received_events_url":"https://api.github.com/users/QuartzBrandi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/QuartzBrandi/C3Projects--TaskListRails","description":"","fork":true,"url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails","forks_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/forks","keys_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/teams","hooks_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/hooks","issue_events_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/issues/events{/number}","events_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/events","assignees_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/assignees{/user}","branches_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/branches{/branch}","tags_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/tags","blobs_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/statuses/{sha}","languages_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/languages","stargazers_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/stargazers","contributors_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/contributors","subscribers_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/subscribers","subscription_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/subscription","commits_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/contents/{+path}","compare_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/merges","archive_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/downloads","issues_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/issues{/number}","pulls_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/pulls{/number}","milestones_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/milestones{/number}","notifications_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/labels{/name}","releases_url":"https://api.github.com/repos/QuartzBrandi/C3Projects--TaskListRails/releases{/id}","created_at":"2015-06-17T18:15:20Z","updated_at":"2015-06-17T18:15:20Z","pushed_at":"2015-06-23T15:56:56Z","git_url":"git://github.com/QuartzBrandi/C3Projects--TaskListRails.git","ssh_url":"git@github.com:QuartzBrandi/C3Projects--TaskListRails.git","clone_url":"https://github.com/QuartzBrandi/C3Projects--TaskListRails.git","svn_url":"https://github.com/QuartzBrandi/C3Projects--TaskListRails","homepage":null,"size":163,"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":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Ada-Developers-Academy:bew/master","ref":"bew/master","sha":"2a1270edcc080695892181708ee27a3e68ae55d3","user":{"login":"Ada-Developers-Academy","id":4689715,"avatar_url":"https://avatars.githubusercontent.com/u/4689715?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-Developers-Academy","html_url":"https://github.com/Ada-Developers-Academy","followers_url":"https://api.github.com/users/Ada-Developers-Academy/followers","following_url":"https://api.github.com/users/Ada-Developers-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Ada-Developers-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-Developers-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-Developers-Academy/subscriptions","organizations_url":"https://api.github.com/users/Ada-Developers-Academy/orgs","repos_url":"https://api.github.com/users/Ada-Developers-Academy/repos","events_url":"https://api.github.com/users/Ada-Developers-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-Developers-Academy/received_events","type":"Organization","site_admin":false},"repo":{"id":37551255,"name":"C3Projects--TaskListRails","full_name":"Ada-Developers-Academy/C3Projects--TaskListRails","owner":{"login":"Ada-Developers-Academy","id":4689715,"avatar_url":"https://avatars.githubusercontent.com/u/4689715?v=3","gravatar_id":"","url":"https://api.github.com/users/Ada-Developers-Academy","html_url":"https://github.com/Ada-Developers-Academy","followers_url":"https://api.github.com/users/Ada-Developers-Academy/followers","following_url":"https://api.github.com/users/Ada-Developers-Academy/following{/other_user}","gists_url":"https://api.github.com/users/Ada-Developers-Academy/gists{/gist_id}","starred_url":"https://api.github.com/users/Ada-Developers-Academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ada-Developers-Academy/subscriptions","organizations_url":"https://api.github.com/users/Ada-Developers-Academy/orgs","repos_url":"https://api.github.com/users/Ada-Developers-Academy/repos","events_url":"https://api.github.com/users/Ada-Developers-Academy/events{/privacy}","received_events_url":"https://api.github.com/users/Ada-Developers-Academy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Ada-Developers-Academy/C3Projects--TaskListRails","description":"","fork":false,"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails","forks_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/forks","keys_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/teams","hooks_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/hooks","issue_events_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/issues/events{/number}","events_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/events","assignees_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/assignees{/user}","branches_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/branches{/branch}","tags_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/tags","blobs_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/statuses/{sha}","languages_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/languages","stargazers_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/stargazers","contributors_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/contributors","subscribers_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/subscribers","subscription_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/subscription","commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/issues/comments{/number}","contents_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/contents/{+path}","compare_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/merges","archive_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/downloads","issues_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/issues{/number}","pulls_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls{/number}","milestones_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/milestones{/number}","notifications_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/labels{/name}","releases_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/releases{/id}","created_at":"2015-06-16T19:26:11Z","updated_at":"2015-06-17T16:36:54Z","pushed_at":"2015-07-07T07:11:58Z","git_url":"git://github.com/Ada-Developers-Academy/C3Projects--TaskListRails.git","ssh_url":"git@github.com:Ada-Developers-Academy/C3Projects--TaskListRails.git","clone_url":"https://github.com/Ada-Developers-Academy/C3Projects--TaskListRails.git","svn_url":"https://github.com/Ada-Developers-Academy/C3Projects--TaskListRails","homepage":null,"size":8002,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":22,"forks":25,"open_issues":22,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/45"},"html":{"href":"https://github.com/Ada-Developers-Academy/C3Projects--TaskListRails/pull/45"},"issue":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/issues/45"},"comments":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/statuses/d98696436b9d9589c7df30834b7dd5cdeb007c8b"}}}}