{"action":"created","comment":{"url":"https://api.github.com/repos/cpsoinos/ACES/pulls/comments/27907475","id":27907475,"diff_hunk":"@@ -18,7 +20,9 @@ def self.top_restaurants\n     top_array = []\n     restaurants = Restaurant.all\n     restaurants.each do |restaurant|\n-      top_hash[restaurant] = restaurant.reviews.sum(:rating)/restaurant.reviews.count\n+      if restaurant.reviews.count > 0","path":"app/models/restaurant.rb","position":16,"original_position":16,"commit_id":"88a12f2808acd54b68b8730e6766226f41176e19","original_commit_id":"88a12f2808acd54b68b8730e6766226f41176e19","user":{"login":"dpickett","id":1082,"avatar_url":"https://avatars.githubusercontent.com/u/1082?v=3","gravatar_id":"","url":"https://api.github.com/users/dpickett","html_url":"https://github.com/dpickett","followers_url":"https://api.github.com/users/dpickett/followers","following_url":"https://api.github.com/users/dpickett/following{/other_user}","gists_url":"https://api.github.com/users/dpickett/gists{/gist_id}","starred_url":"https://api.github.com/users/dpickett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpickett/subscriptions","organizations_url":"https://api.github.com/users/dpickett/orgs","repos_url":"https://api.github.com/users/dpickett/repos","events_url":"https://api.github.com/users/dpickett/events{/privacy}","received_events_url":"https://api.github.com/users/dpickett/received_events","type":"User","site_admin":false},"body":"this is redundant flow control to what is already in the instance method and is therefore unnecessary","created_at":"2015-04-07T18:41:06Z","updated_at":"2015-04-07T18:41:06Z","html_url":"https://github.com/cpsoinos/ACES/pull/9#discussion_r27907475","pull_request_url":"https://api.github.com/repos/cpsoinos/ACES/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/cpsoinos/ACES/pulls/comments/27907475"},"html":{"href":"https://github.com/cpsoinos/ACES/pull/9#discussion_r27907475"},"pull_request":{"href":"https://api.github.com/repos/cpsoinos/ACES/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/cpsoinos/ACES/pulls/9","id":32780867,"html_url":"https://github.com/cpsoinos/ACES/pull/9","diff_url":"https://github.com/cpsoinos/ACES/pull/9.diff","patch_url":"https://github.com/cpsoinos/ACES/pull/9.patch","issue_url":"https://api.github.com/repos/cpsoinos/ACES/issues/9","number":9,"state":"open","locked":false,"title":"RFR_Cp ss search","user":{"login":"cpsoinos","id":10081464,"avatar_url":"https://avatars.githubusercontent.com/u/10081464?v=3","gravatar_id":"","url":"https://api.github.com/users/cpsoinos","html_url":"https://github.com/cpsoinos","followers_url":"https://api.github.com/users/cpsoinos/followers","following_url":"https://api.github.com/users/cpsoinos/following{/other_user}","gists_url":"https://api.github.com/users/cpsoinos/gists{/gist_id}","starred_url":"https://api.github.com/users/cpsoinos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpsoinos/subscriptions","organizations_url":"https://api.github.com/users/cpsoinos/orgs","repos_url":"https://api.github.com/users/cpsoinos/repos","events_url":"https://api.github.com/users/cpsoinos/events{/privacy}","received_events_url":"https://api.github.com/users/cpsoinos/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-07T16:26:42Z","updated_at":"2015-04-07T18:41:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4fc50c15efe5bc257a51bd78f7660b1f9aca3f89","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cpsoinos/ACES/pulls/9/commits","review_comments_url":"https://api.github.com/repos/cpsoinos/ACES/pulls/9/comments","review_comment_url":"https://api.github.com/repos/cpsoinos/ACES/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cpsoinos/ACES/issues/9/comments","statuses_url":"https://api.github.com/repos/cpsoinos/ACES/statuses/88a12f2808acd54b68b8730e6766226f41176e19","head":{"label":"cpsoinos:cp_ss_search","ref":"cp_ss_search","sha":"88a12f2808acd54b68b8730e6766226f41176e19","user":{"login":"cpsoinos","id":10081464,"avatar_url":"https://avatars.githubusercontent.com/u/10081464?v=3","gravatar_id":"","url":"https://api.github.com/users/cpsoinos","html_url":"https://github.com/cpsoinos","followers_url":"https://api.github.com/users/cpsoinos/followers","following_url":"https://api.github.com/users/cpsoinos/following{/other_user}","gists_url":"https://api.github.com/users/cpsoinos/gists{/gist_id}","starred_url":"https://api.github.com/users/cpsoinos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpsoinos/subscriptions","organizations_url":"https://api.github.com/users/cpsoinos/orgs","repos_url":"https://api.github.com/users/cpsoinos/repos","events_url":"https://api.github.com/users/cpsoinos/events{/privacy}","received_events_url":"https://api.github.com/users/cpsoinos/received_events","type":"User","site_admin":false},"repo":{"id":33130536,"name":"ACES","full_name":"cpsoinos/ACES","owner":{"login":"cpsoinos","id":10081464,"avatar_url":"https://avatars.githubusercontent.com/u/10081464?v=3","gravatar_id":"","url":"https://api.github.com/users/cpsoinos","html_url":"https://github.com/cpsoinos","followers_url":"https://api.github.com/users/cpsoinos/followers","following_url":"https://api.github.com/users/cpsoinos/following{/other_user}","gists_url":"https://api.github.com/users/cpsoinos/gists{/gist_id}","starred_url":"https://api.github.com/users/cpsoinos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpsoinos/subscriptions","organizations_url":"https://api.github.com/users/cpsoinos/orgs","repos_url":"https://api.github.com/users/cpsoinos/repos","events_url":"https://api.github.com/users/cpsoinos/events{/privacy}","received_events_url":"https://api.github.com/users/cpsoinos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cpsoinos/ACES","description":"Group Project","fork":false,"url":"https://api.github.com/repos/cpsoinos/ACES","forks_url":"https://api.github.com/repos/cpsoinos/ACES/forks","keys_url":"https://api.github.com/repos/cpsoinos/ACES/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cpsoinos/ACES/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cpsoinos/ACES/teams","hooks_url":"https://api.github.com/repos/cpsoinos/ACES/hooks","issue_events_url":"https://api.github.com/repos/cpsoinos/ACES/issues/events{/number}","events_url":"https://api.github.com/repos/cpsoinos/ACES/events","assignees_url":"https://api.github.com/repos/cpsoinos/ACES/assignees{/user}","branches_url":"https://api.github.com/repos/cpsoinos/ACES/branches{/branch}","tags_url":"https://api.github.com/repos/cpsoinos/ACES/tags","blobs_url":"https://api.github.com/repos/cpsoinos/ACES/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cpsoinos/ACES/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cpsoinos/ACES/git/refs{/sha}","trees_url":"https://api.github.com/repos/cpsoinos/ACES/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cpsoinos/ACES/statuses/{sha}","languages_url":"https://api.github.com/repos/cpsoinos/ACES/languages","stargazers_url":"https://api.github.com/repos/cpsoinos/ACES/stargazers","contributors_url":"https://api.github.com/repos/cpsoinos/ACES/contributors","subscribers_url":"https://api.github.com/repos/cpsoinos/ACES/subscribers","subscription_url":"https://api.github.com/repos/cpsoinos/ACES/subscription","commits_url":"https://api.github.com/repos/cpsoinos/ACES/commits{/sha}","git_commits_url":"https://api.github.com/repos/cpsoinos/ACES/git/commits{/sha}","comments_url":"https://api.github.com/repos/cpsoinos/ACES/comments{/number}","issue_comment_url":"https://api.github.com/repos/cpsoinos/ACES/issues/comments{/number}","contents_url":"https://api.github.com/repos/cpsoinos/ACES/contents/{+path}","compare_url":"https://api.github.com/repos/cpsoinos/ACES/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cpsoinos/ACES/merges","archive_url":"https://api.github.com/repos/cpsoinos/ACES/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cpsoinos/ACES/downloads","issues_url":"https://api.github.com/repos/cpsoinos/ACES/issues{/number}","pulls_url":"https://api.github.com/repos/cpsoinos/ACES/pulls{/number}","milestones_url":"https://api.github.com/repos/cpsoinos/ACES/milestones{/number}","notifications_url":"https://api.github.com/repos/cpsoinos/ACES/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cpsoinos/ACES/labels{/name}","releases_url":"https://api.github.com/repos/cpsoinos/ACES/releases{/id}","created_at":"2015-03-30T15:12:05Z","updated_at":"2015-04-06T23:13:39Z","pushed_at":"2015-04-07T17:49:03Z","git_url":"git://github.com/cpsoinos/ACES.git","ssh_url":"git@github.com:cpsoinos/ACES.git","clone_url":"https://github.com/cpsoinos/ACES.git","svn_url":"https://github.com/cpsoinos/ACES","homepage":null,"size":344,"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":"cpsoinos:master","ref":"master","sha":"3dda523a67ee2e4927d69550728dd856ed01b55c","user":{"login":"cpsoinos","id":10081464,"avatar_url":"https://avatars.githubusercontent.com/u/10081464?v=3","gravatar_id":"","url":"https://api.github.com/users/cpsoinos","html_url":"https://github.com/cpsoinos","followers_url":"https://api.github.com/users/cpsoinos/followers","following_url":"https://api.github.com/users/cpsoinos/following{/other_user}","gists_url":"https://api.github.com/users/cpsoinos/gists{/gist_id}","starred_url":"https://api.github.com/users/cpsoinos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpsoinos/subscriptions","organizations_url":"https://api.github.com/users/cpsoinos/orgs","repos_url":"https://api.github.com/users/cpsoinos/repos","events_url":"https://api.github.com/users/cpsoinos/events{/privacy}","received_events_url":"https://api.github.com/users/cpsoinos/received_events","type":"User","site_admin":false},"repo":{"id":33130536,"name":"ACES","full_name":"cpsoinos/ACES","owner":{"login":"cpsoinos","id":10081464,"avatar_url":"https://avatars.githubusercontent.com/u/10081464?v=3","gravatar_id":"","url":"https://api.github.com/users/cpsoinos","html_url":"https://github.com/cpsoinos","followers_url":"https://api.github.com/users/cpsoinos/followers","following_url":"https://api.github.com/users/cpsoinos/following{/other_user}","gists_url":"https://api.github.com/users/cpsoinos/gists{/gist_id}","starred_url":"https://api.github.com/users/cpsoinos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpsoinos/subscriptions","organizations_url":"https://api.github.com/users/cpsoinos/orgs","repos_url":"https://api.github.com/users/cpsoinos/repos","events_url":"https://api.github.com/users/cpsoinos/events{/privacy}","received_events_url":"https://api.github.com/users/cpsoinos/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cpsoinos/ACES","description":"Group Project","fork":false,"url":"https://api.github.com/repos/cpsoinos/ACES","forks_url":"https://api.github.com/repos/cpsoinos/ACES/forks","keys_url":"https://api.github.com/repos/cpsoinos/ACES/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cpsoinos/ACES/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cpsoinos/ACES/teams","hooks_url":"https://api.github.com/repos/cpsoinos/ACES/hooks","issue_events_url":"https://api.github.com/repos/cpsoinos/ACES/issues/events{/number}","events_url":"https://api.github.com/repos/cpsoinos/ACES/events","assignees_url":"https://api.github.com/repos/cpsoinos/ACES/assignees{/user}","branches_url":"https://api.github.com/repos/cpsoinos/ACES/branches{/branch}","tags_url":"https://api.github.com/repos/cpsoinos/ACES/tags","blobs_url":"https://api.github.com/repos/cpsoinos/ACES/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cpsoinos/ACES/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cpsoinos/ACES/git/refs{/sha}","trees_url":"https://api.github.com/repos/cpsoinos/ACES/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cpsoinos/ACES/statuses/{sha}","languages_url":"https://api.github.com/repos/cpsoinos/ACES/languages","stargazers_url":"https://api.github.com/repos/cpsoinos/ACES/stargazers","contributors_url":"https://api.github.com/repos/cpsoinos/ACES/contributors","subscribers_url":"https://api.github.com/repos/cpsoinos/ACES/subscribers","subscription_url":"https://api.github.com/repos/cpsoinos/ACES/subscription","commits_url":"https://api.github.com/repos/cpsoinos/ACES/commits{/sha}","git_commits_url":"https://api.github.com/repos/cpsoinos/ACES/git/commits{/sha}","comments_url":"https://api.github.com/repos/cpsoinos/ACES/comments{/number}","issue_comment_url":"https://api.github.com/repos/cpsoinos/ACES/issues/comments{/number}","contents_url":"https://api.github.com/repos/cpsoinos/ACES/contents/{+path}","compare_url":"https://api.github.com/repos/cpsoinos/ACES/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cpsoinos/ACES/merges","archive_url":"https://api.github.com/repos/cpsoinos/ACES/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cpsoinos/ACES/downloads","issues_url":"https://api.github.com/repos/cpsoinos/ACES/issues{/number}","pulls_url":"https://api.github.com/repos/cpsoinos/ACES/pulls{/number}","milestones_url":"https://api.github.com/repos/cpsoinos/ACES/milestones{/number}","notifications_url":"https://api.github.com/repos/cpsoinos/ACES/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cpsoinos/ACES/labels{/name}","releases_url":"https://api.github.com/repos/cpsoinos/ACES/releases{/id}","created_at":"2015-03-30T15:12:05Z","updated_at":"2015-04-06T23:13:39Z","pushed_at":"2015-04-07T17:49:03Z","git_url":"git://github.com/cpsoinos/ACES.git","ssh_url":"git@github.com:cpsoinos/ACES.git","clone_url":"https://github.com/cpsoinos/ACES.git","svn_url":"https://github.com/cpsoinos/ACES","homepage":null,"size":344,"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/cpsoinos/ACES/pulls/9"},"html":{"href":"https://github.com/cpsoinos/ACES/pull/9"},"issue":{"href":"https://api.github.com/repos/cpsoinos/ACES/issues/9"},"comments":{"href":"https://api.github.com/repos/cpsoinos/ACES/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/cpsoinos/ACES/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/cpsoinos/ACES/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cpsoinos/ACES/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/cpsoinos/ACES/statuses/88a12f2808acd54b68b8730e6766226f41176e19"}}}}