{"action":"created","comment":{"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/comments/33203445","id":33203445,"diff_hunk":"@@ -0,0 +1,64 @@\n+<h1>Task List</h1>\n+\n+<table>\n+  <tr>\n+    <th>\n+      Name\n+    </th>\n+    <th>\n+      Owner\n+    </th>\n+    <th>\n+      Status\n+    </th>\n+    <th class=\"center\">\n+      Mark Done\n+    </th>\n+    <th class=\"center\">\n+      Details\n+    </th>\n+    <th class=\"center\">\n+      Delete\n+    </th>\n+  </tr>\n+  <tbody>\n+    <% @all_tasks.each do |task| %>\n+      <% if task.completed_date.present? %>\n+        <% @task_css = \"completed\" %>","path":"app/views/tasks/index.html.erb","position":27,"original_position":27,"commit_id":"4024139edb46271745b3cf65035ca3dde566e4c5","original_commit_id":"4024139edb46271745b3cf65035ca3dde566e4c5","user":{"login":"jeremywadsack","id":241324,"avatar_url":"https://avatars.githubusercontent.com/u/241324?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremywadsack","html_url":"https://github.com/jeremywadsack","followers_url":"https://api.github.com/users/jeremywadsack/followers","following_url":"https://api.github.com/users/jeremywadsack/following{/other_user}","gists_url":"https://api.github.com/users/jeremywadsack/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremywadsack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremywadsack/subscriptions","organizations_url":"https://api.github.com/users/jeremywadsack/orgs","repos_url":"https://api.github.com/users/jeremywadsack/repos","events_url":"https://api.github.com/users/jeremywadsack/events{/privacy}","received_events_url":"https://api.github.com/users/jeremywadsack/received_events","type":"User","site_admin":false},"body":"Generally, instance variables (`@something`) are used to pass data between the controller and the view. So it's probably better not to assign them values in the view (because some other view may be expecting the value from the controller).\r\n\r\nIn this case, what you are assigning is scoped within the `.each do` block, so you can just use a local variable, `task_css` (without the `@` prefix).","created_at":"2015-06-24T22:16:37Z","updated_at":"2015-06-24T22:16:37Z","html_url":"https://github.com/Ada-Developers-Academy/C3Projects--TaskListRails/pull/27#discussion_r33203445","pull_request_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/comments/33203445"},"html":{"href":"https://github.com/Ada-Developers-Academy/C3Projects--TaskListRails/pull/27#discussion_r33203445"},"pull_request":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/27","id":38162173,"html_url":"https://github.com/Ada-Developers-Academy/C3Projects--TaskListRails/pull/27","diff_url":"https://github.com/Ada-Developers-Academy/C3Projects--TaskListRails/pull/27.diff","patch_url":"https://github.com/Ada-Developers-Academy/C3Projects--TaskListRails/pull/27.patch","issue_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/issues/27","number":27,"state":"open","locked":false,"title":"Task List Rails project. wave 2 + wave 3 + wave 4","user":{"login":"elsamoluf","id":10170087,"avatar_url":"https://avatars.githubusercontent.com/u/10170087?v=3","gravatar_id":"","url":"https://api.github.com/users/elsamoluf","html_url":"https://github.com/elsamoluf","followers_url":"https://api.github.com/users/elsamoluf/followers","following_url":"https://api.github.com/users/elsamoluf/following{/other_user}","gists_url":"https://api.github.com/users/elsamoluf/gists{/gist_id}","starred_url":"https://api.github.com/users/elsamoluf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elsamoluf/subscriptions","organizations_url":"https://api.github.com/users/elsamoluf/orgs","repos_url":"https://api.github.com/users/elsamoluf/repos","events_url":"https://api.github.com/users/elsamoluf/events{/privacy}","received_events_url":"https://api.github.com/users/elsamoluf/received_events","type":"User","site_admin":false},"body":"Completed the Task List Rails project through wave 3. I'm proud of all my conditional displays, even though not as DRY as could be. Would have been slick if had configured _many_ universal instance variables for completed/incomplete condition instead of repeating ternaries and `.present?` for several different HTML elements, but didn't feel like working on it anymore. Also had to manually rename controller (from 'home' to 'tasks') in order to get `patch`/`update` to work correctly. (Obviously should have been 'tasks' all along, but initial configuration conventions started out a little mysterious, and then became afraid of having to rebuild the whole app based on the initial error, so went as far as could before having to deal with it.) Had initially tried to make `mark_done` action logic just part of `update` action, but kept getting a conflict (\"something something `@task` expects a hash when assigning attributes\"), so ended up splitting them up after growing tired of debugging.","created_at":"2015-06-20T03:51:57Z","updated_at":"2015-06-24T22:16:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"191a114e61d726481345207a60b0ed20b37b4512","assignee":{"login":"jeremywadsack","id":241324,"avatar_url":"https://avatars.githubusercontent.com/u/241324?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremywadsack","html_url":"https://github.com/jeremywadsack","followers_url":"https://api.github.com/users/jeremywadsack/followers","following_url":"https://api.github.com/users/jeremywadsack/following{/other_user}","gists_url":"https://api.github.com/users/jeremywadsack/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremywadsack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremywadsack/subscriptions","organizations_url":"https://api.github.com/users/jeremywadsack/orgs","repos_url":"https://api.github.com/users/jeremywadsack/repos","events_url":"https://api.github.com/users/jeremywadsack/events{/privacy}","received_events_url":"https://api.github.com/users/jeremywadsack/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/27/commits","review_comments_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/27/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/27/comments","statuses_url":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/statuses/4024139edb46271745b3cf65035ca3dde566e4c5","head":{"label":"elsamoluf:edm/master","ref":"edm/master","sha":"4024139edb46271745b3cf65035ca3dde566e4c5","user":{"login":"elsamoluf","id":10170087,"avatar_url":"https://avatars.githubusercontent.com/u/10170087?v=3","gravatar_id":"","url":"https://api.github.com/users/elsamoluf","html_url":"https://github.com/elsamoluf","followers_url":"https://api.github.com/users/elsamoluf/followers","following_url":"https://api.github.com/users/elsamoluf/following{/other_user}","gists_url":"https://api.github.com/users/elsamoluf/gists{/gist_id}","starred_url":"https://api.github.com/users/elsamoluf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elsamoluf/subscriptions","organizations_url":"https://api.github.com/users/elsamoluf/orgs","repos_url":"https://api.github.com/users/elsamoluf/repos","events_url":"https://api.github.com/users/elsamoluf/events{/privacy}","received_events_url":"https://api.github.com/users/elsamoluf/received_events","type":"User","site_admin":false},"repo":{"id":37612579,"name":"C3Projects--TaskListRails","full_name":"elsamoluf/C3Projects--TaskListRails","owner":{"login":"elsamoluf","id":10170087,"avatar_url":"https://avatars.githubusercontent.com/u/10170087?v=3","gravatar_id":"","url":"https://api.github.com/users/elsamoluf","html_url":"https://github.com/elsamoluf","followers_url":"https://api.github.com/users/elsamoluf/followers","following_url":"https://api.github.com/users/elsamoluf/following{/other_user}","gists_url":"https://api.github.com/users/elsamoluf/gists{/gist_id}","starred_url":"https://api.github.com/users/elsamoluf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elsamoluf/subscriptions","organizations_url":"https://api.github.com/users/elsamoluf/orgs","repos_url":"https://api.github.com/users/elsamoluf/repos","events_url":"https://api.github.com/users/elsamoluf/events{/privacy}","received_events_url":"https://api.github.com/users/elsamoluf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elsamoluf/C3Projects--TaskListRails","description":"","fork":true,"url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails","forks_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/forks","keys_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/teams","hooks_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/hooks","issue_events_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/issues/events{/number}","events_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/events","assignees_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/assignees{/user}","branches_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/branches{/branch}","tags_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/tags","blobs_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/git/refs{/sha}","trees_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/statuses/{sha}","languages_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/languages","stargazers_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/stargazers","contributors_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/contributors","subscribers_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/subscribers","subscription_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/subscription","commits_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/commits{/sha}","git_commits_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/git/commits{/sha}","comments_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/comments{/number}","issue_comment_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/issues/comments{/number}","contents_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/contents/{+path}","compare_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/merges","archive_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/downloads","issues_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/issues{/number}","pulls_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/pulls{/number}","milestones_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/milestones{/number}","notifications_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/labels{/name}","releases_url":"https://api.github.com/repos/elsamoluf/C3Projects--TaskListRails/releases{/id}","created_at":"2015-06-17T18:17:23Z","updated_at":"2015-06-17T18:17:23Z","pushed_at":"2015-06-23T15:55:17Z","git_url":"git://github.com/elsamoluf/C3Projects--TaskListRails.git","ssh_url":"git@github.com:elsamoluf/C3Projects--TaskListRails.git","clone_url":"https://github.com/elsamoluf/C3Projects--TaskListRails.git","svn_url":"https://github.com/elsamoluf/C3Projects--TaskListRails","homepage":null,"size":162,"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:edm/master","ref":"edm/master","sha":"63f5ade764ee316ff7687ea13c3495f362fb866d","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-06-24T06:55:35Z","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":8995,"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":24,"forks":25,"open_issues":24,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/27"},"html":{"href":"https://github.com/Ada-Developers-Academy/C3Projects--TaskListRails/pull/27"},"issue":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/issues/27"},"comments":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/pulls/27/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/27/commits"},"statuses":{"href":"https://api.github.com/repos/Ada-Developers-Academy/C3Projects--TaskListRails/statuses/4024139edb46271745b3cf65035ca3dde566e4c5"}}}}