GitHub PullRequestReviewCommentEvent at 2014-08-28 17:18:43
Repository: couchfoodie
Actor: jfarmer
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/stephensxu/couchfoodie/pulls/comments/16853830","id":16853830,"diff_hunk":"@@ -5,33 +5,39 @@\n       <%= flash[:notice] %>\n     <% end %>\n   </div>\n+  \n+  <ul class=\"my_kitchen clearfix\">\n+    <% @kitchens.each do |kitchen| %>\n+      <% next if kitchen.data_status != \"active\" %>\n+    <li>\n+      <hr>\n+      <div class=\"individule_kitchen\">\n+        <dl class=\"individule_kitchen_info\">\n+          <dt class=\"kitchen_name\"><%= kitchen.name %></dt>\n+          <dt class=\"title\">Description: </dt>\n+          <dd><%= kitchen.description %></dd>\n+          <dt class=\"title\">Location: </dt> \n+          <dd><%= kitchen.street_address %>, <%= kitchen.city %>, <%= kitchen.state %>, <%= kitchen.zipcode %></dd>\n+        </dl>\n \n-  <% @kitchens.each do |kitchen| %>\n-    <% next if kitchen.data_status != \"active\" %>\n-  <hr>\n-  <div class=\"individule_kitchen\">\n-    <h3><%= kitchen.name %></h3><br>\n-    <strong>Kitchen owner: </strong><%= kitchen.user.nickname %><br>\n-    <strong>Description: </strong><%= kitchen.description %><br>\n-    <strong>Location: </strong> <%= kitchen.city %>, <%= kitchen.state %>, <%= kitchen.zipcode %><br>\n+        <div class=\"kitchen_reservations_in_kitchen_block\">\n \n-    <div class=\"kitchen_reservations_in_kitchen_block\">\n+          <% reservations_pending = kitchen.reservations.select { |reservation| reservation.status == \"pending\" } %>","path":"app/views/users/user_created_kitchens.erb","position":30,"original_position":30,"commit_id":"6a5db9693a1a285948cefd871795a887d87026df","original_commit_id":"6a5db9693a1a285948cefd871795a887d87026df","user":{"login":"jfarmer","id":37304,"avatar_url":"https://avatars.githubusercontent.com/u/37304?v=2","gravatar_id":"04293a0ffec7db1b3ec9097b52ba69ae","url":"https://api.github.com/users/jfarmer","html_url":"https://github.com/jfarmer","followers_url":"https://api.github.com/users/jfarmer/followers","following_url":"https://api.github.com/users/jfarmer/following{/other_user}","gists_url":"https://api.github.com/users/jfarmer/gists{/gist_id}","starred_url":"https://api.github.com/users/jfarmer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfarmer/subscriptions","organizations_url":"https://api.github.com/users/jfarmer/orgs","repos_url":"https://api.github.com/users/jfarmer/repos","events_url":"https://api.github.com/users/jfarmer/events{/privacy}","received_events_url":"https://api.github.com/users/jfarmer/received_events","type":"User","site_admin":false},"body":"Wait.  What?  No.  1000x no.  Never, ever do this.  First, it's the job of your DATABASE to select and filter the data you want.  Second, if you need to process or format the data from your database for the view, that's _precisely_ why we have controllers.\r\n\r\nDon't put this kind of logic in your views.  If you want a hard-and-fast rule: **never** to variable assignment in a view.","created_at":"2014-08-28T17:18:43Z","updated_at":"2014-08-28T17:18:43Z","html_url":"https://github.com/stephensxu/couchfoodie/pull/6#discussion_r16853830","pull_request_url":"https://api.github.com/repos/stephensxu/couchfoodie/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/stephensxu/couchfoodie/pulls/comments/16853830"},"html":{"href":"https://github.com/stephensxu/couchfoodie/pull/6#discussion_r16853830"},"pull_request":{"href":"https://api.github.com/repos/stephensxu/couchfoodie/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/stephensxu/couchfoodie/pulls/6","id":20406776,"html_url":"https://github.com/stephensxu/couchfoodie/pull/6","diff_url":"https://github.com/stephensxu/couchfoodie/pull/6.diff","patch_url":"https://github.com/stephensxu/couchfoodie/pull/6.patch","issue_url":"https://api.github.com/repos/stephensxu/couchfoodie/issues/6","number":6,"state":"open","locked":false,"title":"Front end version 2 work in progress","user":{"login":"stephensxu","id":6464677,"avatar_url":"https://avatars.githubusercontent.com/u/6464677?v=2","gravatar_id":"041d5ed273cbead14d85a8f5447ad1c8","url":"https://api.github.com/users/stephensxu","html_url":"https://github.com/stephensxu","followers_url":"https://api.github.com/users/stephensxu/followers","following_url":"https://api.github.com/users/stephensxu/following{/other_user}","gists_url":"https://api.github.com/users/stephensxu/gists{/gist_id}","starred_url":"https://api.github.com/users/stephensxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephensxu/subscriptions","organizations_url":"https://api.github.com/users/stephensxu/orgs","repos_url":"https://api.github.com/users/stephensxu/repos","events_url":"https://api.github.com/users/stephensxu/events{/privacy}","received_events_url":"https://api.github.com/users/stephensxu/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-08-27T22:29:29Z","updated_at":"2014-08-28T17:18:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"55b7d2fc7d121486c32090d2a2e9e1f89a086cc8","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/stephensxu/couchfoodie/pulls/6/commits","review_comments_url":"https://api.github.com/repos/stephensxu/couchfoodie/pulls/6/comments","review_comment_url":"https://api.github.com/repos/stephensxu/couchfoodie/pulls/comments/{number}","comments_url":"https://api.github.com/repos/stephensxu/couchfoodie/issues/6/comments","statuses_url":"https://api.github.com/repos/stephensxu/couchfoodie/statuses/6a5db9693a1a285948cefd871795a887d87026df","head":{"label":"stephensxu:front-endv2","ref":"front-endv2","sha":"6a5db9693a1a285948cefd871795a887d87026df","user":{"login":"stephensxu","id":6464677,"avatar_url":"https://avatars.githubusercontent.com/u/6464677?v=2","gravatar_id":"041d5ed273cbead14d85a8f5447ad1c8","url":"https://api.github.com/users/stephensxu","html_url":"https://github.com/stephensxu","followers_url":"https://api.github.com/users/stephensxu/followers","following_url":"https://api.github.com/users/stephensxu/following{/other_user}","gists_url":"https://api.github.com/users/stephensxu/gists{/gist_id}","starred_url":"https://api.github.com/users/stephensxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephensxu/subscriptions","organizations_url":"https://api.github.com/users/stephensxu/orgs","repos_url":"https://api.github.com/users/stephensxu/repos","events_url":"https://api.github.com/users/stephensxu/events{/privacy}","received_events_url":"https://api.github.com/users/stephensxu/received_events","type":"User","site_admin":false},"repo":{"id":22905936,"name":"couchfoodie","full_name":"stephensxu/couchfoodie","owner":{"login":"stephensxu","id":6464677,"avatar_url":"https://avatars.githubusercontent.com/u/6464677?v=2","gravatar_id":"041d5ed273cbead14d85a8f5447ad1c8","url":"https://api.github.com/users/stephensxu","html_url":"https://github.com/stephensxu","followers_url":"https://api.github.com/users/stephensxu/followers","following_url":"https://api.github.com/users/stephensxu/following{/other_user}","gists_url":"https://api.github.com/users/stephensxu/gists{/gist_id}","starred_url":"https://api.github.com/users/stephensxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephensxu/subscriptions","organizations_url":"https://api.github.com/users/stephensxu/orgs","repos_url":"https://api.github.com/users/stephensxu/repos","events_url":"https://api.github.com/users/stephensxu/events{/privacy}","received_events_url":"https://api.github.com/users/stephensxu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stephensxu/couchfoodie","description":"","fork":false,"url":"https://api.github.com/repos/stephensxu/couchfoodie","forks_url":"https://api.github.com/repos/stephensxu/couchfoodie/forks","keys_url":"https://api.github.com/repos/stephensxu/couchfoodie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stephensxu/couchfoodie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stephensxu/couchfoodie/teams","hooks_url":"https://api.github.com/repos/stephensxu/couchfoodie/hooks","issue_events_url":"https://api.github.com/repos/stephensxu/couchfoodie/issues/events{/number}","events_url":"https://api.github.com/repos/stephensxu/couchfoodie/events","assignees_url":"https://api.github.com/repos/stephensxu/couchfoodie/assignees{/user}","branches_url":"https://api.github.com/repos/stephensxu/couchfoodie/branches{/branch}","tags_url":"https://api.github.com/repos/stephensxu/couchfoodie/tags","blobs_url":"https://api.github.com/repos/stephensxu/couchfoodie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stephensxu/couchfoodie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stephensxu/couchfoodie/git/refs{/sha}","trees_url":"https://api.github.com/repos/stephensxu/couchfoodie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stephensxu/couchfoodie/statuses/{sha}","languages_url":"https://api.github.com/repos/stephensxu/couchfoodie/languages","stargazers_url":"https://api.github.com/repos/stephensxu/couchfoodie/stargazers","contributors_url":"https://api.github.com/repos/stephensxu/couchfoodie/contributors","subscribers_url":"https://api.github.com/repos/stephensxu/couchfoodie/subscribers","subscription_url":"https://api.github.com/repos/stephensxu/couchfoodie/subscription","commits_url":"https://api.github.com/repos/stephensxu/couchfoodie/commits{/sha}","git_commits_url":"https://api.github.com/repos/stephensxu/couchfoodie/git/commits{/sha}","comments_url":"https://api.github.com/repos/stephensxu/couchfoodie/comments{/number}","issue_comment_url":"https://api.github.com/repos/stephensxu/couchfoodie/issues/comments/{number}","contents_url":"https://api.github.com/repos/stephensxu/couchfoodie/contents/{+path}","compare_url":"https://api.github.com/repos/stephensxu/couchfoodie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stephensxu/couchfoodie/merges","archive_url":"https://api.github.com/repos/stephensxu/couchfoodie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stephensxu/couchfoodie/downloads","issues_url":"https://api.github.com/repos/stephensxu/couchfoodie/issues{/number}","pulls_url":"https://api.github.com/repos/stephensxu/couchfoodie/pulls{/number}","milestones_url":"https://api.github.com/repos/stephensxu/couchfoodie/milestones{/number}","notifications_url":"https://api.github.com/repos/stephensxu/couchfoodie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stephensxu/couchfoodie/labels{/name}","releases_url":"https://api.github.com/repos/stephensxu/couchfoodie/releases{/id}","created_at":"2014-08-13T07:00:30Z","updated_at":"2014-08-13T23:57:33Z","pushed_at":"2014-08-28T09:47:31Z","git_url":"git://github.com/stephensxu/couchfoodie.git","ssh_url":"git@github.com:stephensxu/couchfoodie.git","clone_url":"https://github.com/stephensxu/couchfoodie.git","svn_url":"https://github.com/stephensxu/couchfoodie","homepage":null,"size":8628,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"stephensxu:master","ref":"master","sha":"b44f738141ab2ef9307c83759f9e3764fd35c523","user":{"login":"stephensxu","id":6464677,"avatar_url":"https://avatars.githubusercontent.com/u/6464677?v=2","gravatar_id":"041d5ed273cbead14d85a8f5447ad1c8","url":"https://api.github.com/users/stephensxu","html_url":"https://github.com/stephensxu","followers_url":"https://api.github.com/users/stephensxu/followers","following_url":"https://api.github.com/users/stephensxu/following{/other_user}","gists_url":"https://api.github.com/users/stephensxu/gists{/gist_id}","starred_url":"https://api.github.com/users/stephensxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephensxu/subscriptions","organizations_url":"https://api.github.com/users/stephensxu/orgs","repos_url":"https://api.github.com/users/stephensxu/repos","events_url":"https://api.github.com/users/stephensxu/events{/privacy}","received_events_url":"https://api.github.com/users/stephensxu/received_events","type":"User","site_admin":false},"repo":{"id":22905936,"name":"couchfoodie","full_name":"stephensxu/couchfoodie","owner":{"login":"stephensxu","id":6464677,"avatar_url":"https://avatars.githubusercontent.com/u/6464677?v=2","gravatar_id":"041d5ed273cbead14d85a8f5447ad1c8","url":"https://api.github.com/users/stephensxu","html_url":"https://github.com/stephensxu","followers_url":"https://api.github.com/users/stephensxu/followers","following_url":"https://api.github.com/users/stephensxu/following{/other_user}","gists_url":"https://api.github.com/users/stephensxu/gists{/gist_id}","starred_url":"https://api.github.com/users/stephensxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stephensxu/subscriptions","organizations_url":"https://api.github.com/users/stephensxu/orgs","repos_url":"https://api.github.com/users/stephensxu/repos","events_url":"https://api.github.com/users/stephensxu/events{/privacy}","received_events_url":"https://api.github.com/users/stephensxu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/stephensxu/couchfoodie","description":"","fork":false,"url":"https://api.github.com/repos/stephensxu/couchfoodie","forks_url":"https://api.github.com/repos/stephensxu/couchfoodie/forks","keys_url":"https://api.github.com/repos/stephensxu/couchfoodie/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stephensxu/couchfoodie/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stephensxu/couchfoodie/teams","hooks_url":"https://api.github.com/repos/stephensxu/couchfoodie/hooks","issue_events_url":"https://api.github.com/repos/stephensxu/couchfoodie/issues/events{/number}","events_url":"https://api.github.com/repos/stephensxu/couchfoodie/events","assignees_url":"https://api.github.com/repos/stephensxu/couchfoodie/assignees{/user}","branches_url":"https://api.github.com/repos/stephensxu/couchfoodie/branches{/branch}","tags_url":"https://api.github.com/repos/stephensxu/couchfoodie/tags","blobs_url":"https://api.github.com/repos/stephensxu/couchfoodie/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stephensxu/couchfoodie/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stephensxu/couchfoodie/git/refs{/sha}","trees_url":"https://api.github.com/repos/stephensxu/couchfoodie/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stephensxu/couchfoodie/statuses/{sha}","languages_url":"https://api.github.com/repos/stephensxu/couchfoodie/languages","stargazers_url":"https://api.github.com/repos/stephensxu/couchfoodie/stargazers","contributors_url":"https://api.github.com/repos/stephensxu/couchfoodie/contributors","subscribers_url":"https://api.github.com/repos/stephensxu/couchfoodie/subscribers","subscription_url":"https://api.github.com/repos/stephensxu/couchfoodie/subscription","commits_url":"https://api.github.com/repos/stephensxu/couchfoodie/commits{/sha}","git_commits_url":"https://api.github.com/repos/stephensxu/couchfoodie/git/commits{/sha}","comments_url":"https://api.github.com/repos/stephensxu/couchfoodie/comments{/number}","issue_comment_url":"https://api.github.com/repos/stephensxu/couchfoodie/issues/comments/{number}","contents_url":"https://api.github.com/repos/stephensxu/couchfoodie/contents/{+path}","compare_url":"https://api.github.com/repos/stephensxu/couchfoodie/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stephensxu/couchfoodie/merges","archive_url":"https://api.github.com/repos/stephensxu/couchfoodie/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stephensxu/couchfoodie/downloads","issues_url":"https://api.github.com/repos/stephensxu/couchfoodie/issues{/number}","pulls_url":"https://api.github.com/repos/stephensxu/couchfoodie/pulls{/number}","milestones_url":"https://api.github.com/repos/stephensxu/couchfoodie/milestones{/number}","notifications_url":"https://api.github.com/repos/stephensxu/couchfoodie/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stephensxu/couchfoodie/labels{/name}","releases_url":"https://api.github.com/repos/stephensxu/couchfoodie/releases{/id}","created_at":"2014-08-13T07:00:30Z","updated_at":"2014-08-13T23:57:33Z","pushed_at":"2014-08-28T09:47:31Z","git_url":"git://github.com/stephensxu/couchfoodie.git","ssh_url":"git@github.com:stephensxu/couchfoodie.git","clone_url":"https://github.com/stephensxu/couchfoodie.git","svn_url":"https://github.com/stephensxu/couchfoodie","homepage":null,"size":8628,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"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/stephensxu/couchfoodie/pulls/6"},"html":{"href":"https://github.com/stephensxu/couchfoodie/pull/6"},"issue":{"href":"https://api.github.com/repos/stephensxu/couchfoodie/issues/6"},"comments":{"href":"https://api.github.com/repos/stephensxu/couchfoodie/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/stephensxu/couchfoodie/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/stephensxu/couchfoodie/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/stephensxu/couchfoodie/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/stephensxu/couchfoodie/statuses/6a5db9693a1a285948cefd871795a887d87026df"}}}}