{"action":"created","comment":{"url":"https://api.github.com/repos/hummingbird-me/hummingbird/pulls/comments/24233760","id":24233760,"diff_hunk":"@@ -0,0 +1,85 @@\n+class GroupsController < ApplicationController\n+  def index\n+    # currently also using this endpoint to pull down suggested groups\n+    groups = if params[:limit].present? # Get a specific amount of trending\n+      Group.trending(params[:limit].to_i)\n+    elsif params[:trending].present? # Get all trending groups, paginated\n+      Group.trending(0).page(params[:page]).per(20)","path":"app/controllers/groups_controller.rb","position":7,"original_position":7,"commit_id":"d4bca75aa45ec48f1094a09d722d5aa0354c3277","original_commit_id":"d4bca75aa45ec48f1094a09d722d5aa0354c3277","user":{"login":"vikhyat","id":31063,"avatar_url":"https://avatars.githubusercontent.com/u/31063?v=3","gravatar_id":"","url":"https://api.github.com/users/vikhyat","html_url":"https://github.com/vikhyat","followers_url":"https://api.github.com/users/vikhyat/followers","following_url":"https://api.github.com/users/vikhyat/following{/other_user}","gists_url":"https://api.github.com/users/vikhyat/gists{/gist_id}","starred_url":"https://api.github.com/users/vikhyat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikhyat/subscriptions","organizations_url":"https://api.github.com/users/vikhyat/orgs","repos_url":"https://api.github.com/users/vikhyat/repos","events_url":"https://api.github.com/users/vikhyat/events{/privacy}","received_events_url":"https://api.github.com/users/vikhyat/received_events","type":"User","site_admin":false},"body":"Also I don't believe this will actually work.\r\n\r\n`Group.trending(0)` will do a Redis lookup that returns the IDs of _all_ the trending groups. Then we do a `Group.where(id: <ids>)` which can return results in any order.","created_at":"2015-02-06T10:53:39Z","updated_at":"2015-02-06T10:53:39Z","html_url":"https://github.com/hummingbird-me/hummingbird/pull/409#discussion_r24233760","pull_request_url":"https://api.github.com/repos/hummingbird-me/hummingbird/pulls/409","_links":{"self":{"href":"https://api.github.com/repos/hummingbird-me/hummingbird/pulls/comments/24233760"},"html":{"href":"https://github.com/hummingbird-me/hummingbird/pull/409#discussion_r24233760"},"pull_request":{"href":"https://api.github.com/repos/hummingbird-me/hummingbird/pulls/409"}}},"pull_request":{"url":"https://api.github.com/repos/hummingbird-me/hummingbird/pulls/409","id":28787790,"html_url":"https://github.com/hummingbird-me/hummingbird/pull/409","diff_url":"https://github.com/hummingbird-me/hummingbird/pull/409.diff","patch_url":"https://github.com/hummingbird-me/hummingbird/pull/409.patch","issue_url":"https://api.github.com/repos/hummingbird-me/hummingbird/issues/409","number":409,"state":"open","locked":false,"title":"Groups","user":{"login":"NuckChorris","id":430411,"avatar_url":"https://avatars.githubusercontent.com/u/430411?v=3","gravatar_id":"","url":"https://api.github.com/users/NuckChorris","html_url":"https://github.com/NuckChorris","followers_url":"https://api.github.com/users/NuckChorris/followers","following_url":"https://api.github.com/users/NuckChorris/following{/other_user}","gists_url":"https://api.github.com/users/NuckChorris/gists{/gist_id}","starred_url":"https://api.github.com/users/NuckChorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NuckChorris/subscriptions","organizations_url":"https://api.github.com/users/NuckChorris/orgs","repos_url":"https://api.github.com/users/NuckChorris/repos","events_url":"https://api.github.com/users/NuckChorris/events{/privacy}","received_events_url":"https://api.github.com/users/NuckChorris/received_events","type":"User","site_admin":false},"body":"Since the checklist seems to be done, let's get reviewing this monster.\r\n\r\nIn hindsight, it was probably a bad idea to do this in one big feature branch.","created_at":"2015-02-06T06:25:42Z","updated_at":"2015-02-06T10:53:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e84b1218baccf79f10cf2bf60621b5b1114ab391","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hummingbird-me/hummingbird/pulls/409/commits","review_comments_url":"https://api.github.com/repos/hummingbird-me/hummingbird/pulls/409/comments","review_comment_url":"https://api.github.com/repos/hummingbird-me/hummingbird/pulls/comments/{number}","comments_url":"https://api.github.com/repos/hummingbird-me/hummingbird/issues/409/comments","statuses_url":"https://api.github.com/repos/hummingbird-me/hummingbird/statuses/d4bca75aa45ec48f1094a09d722d5aa0354c3277","head":{"label":"hummingbird-me:groups","ref":"groups","sha":"d4bca75aa45ec48f1094a09d722d5aa0354c3277","user":{"login":"hummingbird-me","id":7648832,"avatar_url":"https://avatars.githubusercontent.com/u/7648832?v=3","gravatar_id":"","url":"https://api.github.com/users/hummingbird-me","html_url":"https://github.com/hummingbird-me","followers_url":"https://api.github.com/users/hummingbird-me/followers","following_url":"https://api.github.com/users/hummingbird-me/following{/other_user}","gists_url":"https://api.github.com/users/hummingbird-me/gists{/gist_id}","starred_url":"https://api.github.com/users/hummingbird-me/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hummingbird-me/subscriptions","organizations_url":"https://api.github.com/users/hummingbird-me/orgs","repos_url":"https://api.github.com/users/hummingbird-me/repos","events_url":"https://api.github.com/users/hummingbird-me/events{/privacy}","received_events_url":"https://api.github.com/users/hummingbird-me/received_events","type":"Organization","site_admin":false},"repo":{"id":20206508,"name":"hummingbird","full_name":"hummingbird-me/hummingbird","owner":{"login":"hummingbird-me","id":7648832,"avatar_url":"https://avatars.githubusercontent.com/u/7648832?v=3","gravatar_id":"","url":"https://api.github.com/users/hummingbird-me","html_url":"https://github.com/hummingbird-me","followers_url":"https://api.github.com/users/hummingbird-me/followers","following_url":"https://api.github.com/users/hummingbird-me/following{/other_user}","gists_url":"https://api.github.com/users/hummingbird-me/gists{/gist_id}","starred_url":"https://api.github.com/users/hummingbird-me/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hummingbird-me/subscriptions","organizations_url":"https://api.github.com/users/hummingbird-me/orgs","repos_url":"https://api.github.com/users/hummingbird-me/repos","events_url":"https://api.github.com/users/hummingbird-me/events{/privacy}","received_events_url":"https://api.github.com/users/hummingbird-me/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hummingbird-me/hummingbird","description":"Probably the coolest anime discovery platform around.","fork":false,"url":"https://api.github.com/repos/hummingbird-me/hummingbird","forks_url":"https://api.github.com/repos/hummingbird-me/hummingbird/forks","keys_url":"https://api.github.com/repos/hummingbird-me/hummingbird/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hummingbird-me/hummingbird/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hummingbird-me/hummingbird/teams","hooks_url":"https://api.github.com/repos/hummingbird-me/hummingbird/hooks","issue_events_url":"https://api.github.com/repos/hummingbird-me/hummingbird/issues/events{/number}","events_url":"https://api.github.com/repos/hummingbird-me/hummingbird/events","assignees_url":"https://api.github.com/repos/hummingbird-me/hummingbird/assignees{/user}","branches_url":"https://api.github.com/repos/hummingbird-me/hummingbird/branches{/branch}","tags_url":"https://api.github.com/repos/hummingbird-me/hummingbird/tags","blobs_url":"https://api.github.com/repos/hummingbird-me/hummingbird/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hummingbird-me/hummingbird/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hummingbird-me/hummingbird/git/refs{/sha}","trees_url":"https://api.github.com/repos/hummingbird-me/hummingbird/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hummingbird-me/hummingbird/statuses/{sha}","languages_url":"https://api.github.com/repos/hummingbird-me/hummingbird/languages","stargazers_url":"https://api.github.com/repos/hummingbird-me/hummingbird/stargazers","contributors_url":"https://api.github.com/repos/hummingbird-me/hummingbird/contributors","subscribers_url":"https://api.github.com/repos/hummingbird-me/hummingbird/subscribers","subscription_url":"https://api.github.com/repos/hummingbird-me/hummingbird/subscription","commits_url":"https://api.github.com/repos/hummingbird-me/hummingbird/commits{/sha}","git_commits_url":"https://api.github.com/repos/hummingbird-me/hummingbird/git/commits{/sha}","comments_url":"https://api.github.com/repos/hummingbird-me/hummingbird/comments{/number}","issue_comment_url":"https://api.github.com/repos/hummingbird-me/hummingbird/issues/comments/{number}","contents_url":"https://api.github.com/repos/hummingbird-me/hummingbird/contents/{+path}","compare_url":"https://api.github.com/repos/hummingbird-me/hummingbird/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hummingbird-me/hummingbird/merges","archive_url":"https://api.github.com/repos/hummingbird-me/hummingbird/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hummingbird-me/hummingbird/downloads","issues_url":"https://api.github.com/repos/hummingbird-me/hummingbird/issues{/number}","pulls_url":"https://api.github.com/repos/hummingbird-me/hummingbird/pulls{/number}","milestones_url":"https://api.github.com/repos/hummingbird-me/hummingbird/milestones{/number}","notifications_url":"https://api.github.com/repos/hummingbird-me/hummingbird/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hummingbird-me/hummingbird/labels{/name}","releases_url":"https://api.github.com/repos/hummingbird-me/hummingbird/releases{/id}","created_at":"2014-05-27T04:05:08Z","updated_at":"2015-02-05T18:09:58Z","pushed_at":"2015-02-06T08:50:43Z","git_url":"git://github.com/hummingbird-me/hummingbird.git","ssh_url":"git@github.com:hummingbird-me/hummingbird.git","clone_url":"https://github.com/hummingbird-me/hummingbird.git","svn_url":"https://github.com/hummingbird-me/hummingbird","homepage":"http://hummingbird.me/","size":72066,"stargazers_count":1282,"watchers_count":1282,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":117,"mirror_url":null,"open_issues_count":47,"forks":117,"open_issues":47,"watchers":1282,"default_branch":"master"}},"base":{"label":"hummingbird-me:master","ref":"master","sha":"123c9169bff29d30ee6c6b37d47b079b5ae29cf1","user":{"login":"hummingbird-me","id":7648832,"avatar_url":"https://avatars.githubusercontent.com/u/7648832?v=3","gravatar_id":"","url":"https://api.github.com/users/hummingbird-me","html_url":"https://github.com/hummingbird-me","followers_url":"https://api.github.com/users/hummingbird-me/followers","following_url":"https://api.github.com/users/hummingbird-me/following{/other_user}","gists_url":"https://api.github.com/users/hummingbird-me/gists{/gist_id}","starred_url":"https://api.github.com/users/hummingbird-me/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hummingbird-me/subscriptions","organizations_url":"https://api.github.com/users/hummingbird-me/orgs","repos_url":"https://api.github.com/users/hummingbird-me/repos","events_url":"https://api.github.com/users/hummingbird-me/events{/privacy}","received_events_url":"https://api.github.com/users/hummingbird-me/received_events","type":"Organization","site_admin":false},"repo":{"id":20206508,"name":"hummingbird","full_name":"hummingbird-me/hummingbird","owner":{"login":"hummingbird-me","id":7648832,"avatar_url":"https://avatars.githubusercontent.com/u/7648832?v=3","gravatar_id":"","url":"https://api.github.com/users/hummingbird-me","html_url":"https://github.com/hummingbird-me","followers_url":"https://api.github.com/users/hummingbird-me/followers","following_url":"https://api.github.com/users/hummingbird-me/following{/other_user}","gists_url":"https://api.github.com/users/hummingbird-me/gists{/gist_id}","starred_url":"https://api.github.com/users/hummingbird-me/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hummingbird-me/subscriptions","organizations_url":"https://api.github.com/users/hummingbird-me/orgs","repos_url":"https://api.github.com/users/hummingbird-me/repos","events_url":"https://api.github.com/users/hummingbird-me/events{/privacy}","received_events_url":"https://api.github.com/users/hummingbird-me/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hummingbird-me/hummingbird","description":"Probably the coolest anime discovery platform around.","fork":false,"url":"https://api.github.com/repos/hummingbird-me/hummingbird","forks_url":"https://api.github.com/repos/hummingbird-me/hummingbird/forks","keys_url":"https://api.github.com/repos/hummingbird-me/hummingbird/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hummingbird-me/hummingbird/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hummingbird-me/hummingbird/teams","hooks_url":"https://api.github.com/repos/hummingbird-me/hummingbird/hooks","issue_events_url":"https://api.github.com/repos/hummingbird-me/hummingbird/issues/events{/number}","events_url":"https://api.github.com/repos/hummingbird-me/hummingbird/events","assignees_url":"https://api.github.com/repos/hummingbird-me/hummingbird/assignees{/user}","branches_url":"https://api.github.com/repos/hummingbird-me/hummingbird/branches{/branch}","tags_url":"https://api.github.com/repos/hummingbird-me/hummingbird/tags","blobs_url":"https://api.github.com/repos/hummingbird-me/hummingbird/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hummingbird-me/hummingbird/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hummingbird-me/hummingbird/git/refs{/sha}","trees_url":"https://api.github.com/repos/hummingbird-me/hummingbird/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hummingbird-me/hummingbird/statuses/{sha}","languages_url":"https://api.github.com/repos/hummingbird-me/hummingbird/languages","stargazers_url":"https://api.github.com/repos/hummingbird-me/hummingbird/stargazers","contributors_url":"https://api.github.com/repos/hummingbird-me/hummingbird/contributors","subscribers_url":"https://api.github.com/repos/hummingbird-me/hummingbird/subscribers","subscription_url":"https://api.github.com/repos/hummingbird-me/hummingbird/subscription","commits_url":"https://api.github.com/repos/hummingbird-me/hummingbird/commits{/sha}","git_commits_url":"https://api.github.com/repos/hummingbird-me/hummingbird/git/commits{/sha}","comments_url":"https://api.github.com/repos/hummingbird-me/hummingbird/comments{/number}","issue_comment_url":"https://api.github.com/repos/hummingbird-me/hummingbird/issues/comments/{number}","contents_url":"https://api.github.com/repos/hummingbird-me/hummingbird/contents/{+path}","compare_url":"https://api.github.com/repos/hummingbird-me/hummingbird/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hummingbird-me/hummingbird/merges","archive_url":"https://api.github.com/repos/hummingbird-me/hummingbird/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hummingbird-me/hummingbird/downloads","issues_url":"https://api.github.com/repos/hummingbird-me/hummingbird/issues{/number}","pulls_url":"https://api.github.com/repos/hummingbird-me/hummingbird/pulls{/number}","milestones_url":"https://api.github.com/repos/hummingbird-me/hummingbird/milestones{/number}","notifications_url":"https://api.github.com/repos/hummingbird-me/hummingbird/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hummingbird-me/hummingbird/labels{/name}","releases_url":"https://api.github.com/repos/hummingbird-me/hummingbird/releases{/id}","created_at":"2014-05-27T04:05:08Z","updated_at":"2015-02-05T18:09:58Z","pushed_at":"2015-02-06T08:50:43Z","git_url":"git://github.com/hummingbird-me/hummingbird.git","ssh_url":"git@github.com:hummingbird-me/hummingbird.git","clone_url":"https://github.com/hummingbird-me/hummingbird.git","svn_url":"https://github.com/hummingbird-me/hummingbird","homepage":"http://hummingbird.me/","size":72066,"stargazers_count":1282,"watchers_count":1282,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":117,"mirror_url":null,"open_issues_count":47,"forks":117,"open_issues":47,"watchers":1282,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hummingbird-me/hummingbird/pulls/409"},"html":{"href":"https://github.com/hummingbird-me/hummingbird/pull/409"},"issue":{"href":"https://api.github.com/repos/hummingbird-me/hummingbird/issues/409"},"comments":{"href":"https://api.github.com/repos/hummingbird-me/hummingbird/issues/409/comments"},"review_comments":{"href":"https://api.github.com/repos/hummingbird-me/hummingbird/pulls/409/comments"},"review_comment":{"href":"https://api.github.com/repos/hummingbird-me/hummingbird/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/hummingbird-me/hummingbird/pulls/409/commits"},"statuses":{"href":"https://api.github.com/repos/hummingbird-me/hummingbird/statuses/d4bca75aa45ec48f1094a09d722d5aa0354c3277"}}}}