{"action":"created","comment":{"url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/comments/74775819","id":74775819,"diff_hunk":"@@ -25,33 +25,35 @@ def launched_workflows\n     Workflow\n       .joins(:project)\n       .where(\"projects.launch_approved IS TRUE\")\n-      .select(:id, :use_cellect)\n+      .select(:id, :use_cellect, :pairwise, :prioritized, :grouped)\n   end\n \n-  def workflow_ids_using_cellect\n+  def workflows_using_cellect\n     launched_workflows.collect do |w|\n-      w.using_cellect? ? w.id : nil\n+      w.using_cellect? ? w.slice(:id, :pairwise, :prioritized, :grouped) : nil\n     end.compact\n   end\n \n-  def all_cellect_workflow_ids\n-    cache_key = \"#{Rails.env}#all_cellect_workflow_ids\"\n+  def all_cellect_workflows\n+    cache_key = \"#{Rails.env}#all_cellect_workflows\"\n     Rails.cache.fetch(cache_key, expires_in: EXPIRY) do\n-      workflow_ids_using_cellect | Workflow.using_cellect.pluck(:id)\n+      workflows_using_cellect\n     end\n   end\n \n-  def cellect_workflow_subject_ids\n+  def cellect_workflow_subjects\n     if workflow = cellect_workflow_from_param\n-      SetMemberSubject.non_retired_for_workflow(workflow).pluck(:subject_id)\n+      SetMemberSubject\n+        .non_retired_for_workflow(workflow)\n+        .select(:id, :priority)","path":"app/controllers/cellect_controller.rb","position":null,"original_position":50,"commit_id":"3befd1fe2a4888d72a3eb72687c2e1ec4d09f5e0","original_commit_id":"69f77f737c12a366516aadd078010c37c80b2525","user":{"login":"parrish","id":122990,"avatar_url":"https://avatars.githubusercontent.com/u/122990?v=3","gravatar_id":"","url":"https://api.github.com/users/parrish","html_url":"https://github.com/parrish","followers_url":"https://api.github.com/users/parrish/followers","following_url":"https://api.github.com/users/parrish/following{/other_user}","gists_url":"https://api.github.com/users/parrish/gists{/gist_id}","starred_url":"https://api.github.com/users/parrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parrish/subscriptions","organizations_url":"https://api.github.com/users/parrish/orgs","repos_url":"https://api.github.com/users/parrish/repos","events_url":"https://api.github.com/users/parrish/events{/privacy}","received_events_url":"https://api.github.com/users/parrish/received_events","type":"User","site_admin":false},"body":"Yep, that got it.  Thanks!","created_at":"2016-08-15T15:06:25Z","updated_at":"2016-08-15T15:06:25Z","html_url":"https://github.com/zooniverse/Panoptes/pull/1906#discussion_r74775819","pull_request_url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1906","_links":{"self":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/comments/74775819"},"html":{"href":"https://github.com/zooniverse/Panoptes/pull/1906#discussion_r74775819"},"pull_request":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1906"}}},"pull_request":{"url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1906","id":81159806,"html_url":"https://github.com/zooniverse/Panoptes/pull/1906","diff_url":"https://github.com/zooniverse/Panoptes/pull/1906.diff","patch_url":"https://github.com/zooniverse/Panoptes/pull/1906.patch","issue_url":"https://api.github.com/repos/zooniverse/Panoptes/issues/1906","number":1906,"state":"open","locked":false,"title":"Update CellectController responses to be more usable","user":{"login":"parrish","id":122990,"avatar_url":"https://avatars.githubusercontent.com/u/122990?v=3","gravatar_id":"","url":"https://api.github.com/users/parrish","html_url":"https://github.com/parrish","followers_url":"https://api.github.com/users/parrish/followers","following_url":"https://api.github.com/users/parrish/following{/other_user}","gists_url":"https://api.github.com/users/parrish/gists{/gist_id}","starred_url":"https://api.github.com/users/parrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parrish/subscriptions","organizations_url":"https://api.github.com/users/parrish/orgs","repos_url":"https://api.github.com/users/parrish/repos","events_url":"https://api.github.com/users/parrish/events{/privacy}","received_events_url":"https://api.github.com/users/parrish/received_events","type":"User","site_admin":false},"body":"Instead of just returning ids, it returns the necessary fields for cellect.","created_at":"2016-08-12T18:11:22Z","updated_at":"2016-08-15T15:06:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bceb301797c7b7525a7a3a77d877e052a95d30f5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1906/commits","review_comments_url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1906/comments","review_comment_url":"https://api.github.com/repos/zooniverse/Panoptes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zooniverse/Panoptes/issues/1906/comments","statuses_url":"https://api.github.com/repos/zooniverse/Panoptes/statuses/3befd1fe2a4888d72a3eb72687c2e1ec4d09f5e0","head":{"label":"parrish:update_cellect_controller","ref":"update_cellect_controller","sha":"3befd1fe2a4888d72a3eb72687c2e1ec4d09f5e0","user":{"login":"parrish","id":122990,"avatar_url":"https://avatars.githubusercontent.com/u/122990?v=3","gravatar_id":"","url":"https://api.github.com/users/parrish","html_url":"https://github.com/parrish","followers_url":"https://api.github.com/users/parrish/followers","following_url":"https://api.github.com/users/parrish/following{/other_user}","gists_url":"https://api.github.com/users/parrish/gists{/gist_id}","starred_url":"https://api.github.com/users/parrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parrish/subscriptions","organizations_url":"https://api.github.com/users/parrish/orgs","repos_url":"https://api.github.com/users/parrish/repos","events_url":"https://api.github.com/users/parrish/events{/privacy}","received_events_url":"https://api.github.com/users/parrish/received_events","type":"User","site_admin":false},"repo":{"id":21216042,"name":"Panoptes","full_name":"parrish/Panoptes","owner":{"login":"parrish","id":122990,"avatar_url":"https://avatars.githubusercontent.com/u/122990?v=3","gravatar_id":"","url":"https://api.github.com/users/parrish","html_url":"https://github.com/parrish","followers_url":"https://api.github.com/users/parrish/followers","following_url":"https://api.github.com/users/parrish/following{/other_user}","gists_url":"https://api.github.com/users/parrish/gists{/gist_id}","starred_url":"https://api.github.com/users/parrish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parrish/subscriptions","organizations_url":"https://api.github.com/users/parrish/orgs","repos_url":"https://api.github.com/users/parrish/repos","events_url":"https://api.github.com/users/parrish/events{/privacy}","received_events_url":"https://api.github.com/users/parrish/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/parrish/Panoptes","description":"It sees everything","fork":true,"url":"https://api.github.com/repos/parrish/Panoptes","forks_url":"https://api.github.com/repos/parrish/Panoptes/forks","keys_url":"https://api.github.com/repos/parrish/Panoptes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/parrish/Panoptes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/parrish/Panoptes/teams","hooks_url":"https://api.github.com/repos/parrish/Panoptes/hooks","issue_events_url":"https://api.github.com/repos/parrish/Panoptes/issues/events{/number}","events_url":"https://api.github.com/repos/parrish/Panoptes/events","assignees_url":"https://api.github.com/repos/parrish/Panoptes/assignees{/user}","branches_url":"https://api.github.com/repos/parrish/Panoptes/branches{/branch}","tags_url":"https://api.github.com/repos/parrish/Panoptes/tags","blobs_url":"https://api.github.com/repos/parrish/Panoptes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/parrish/Panoptes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/parrish/Panoptes/git/refs{/sha}","trees_url":"https://api.github.com/repos/parrish/Panoptes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/parrish/Panoptes/statuses/{sha}","languages_url":"https://api.github.com/repos/parrish/Panoptes/languages","stargazers_url":"https://api.github.com/repos/parrish/Panoptes/stargazers","contributors_url":"https://api.github.com/repos/parrish/Panoptes/contributors","subscribers_url":"https://api.github.com/repos/parrish/Panoptes/subscribers","subscription_url":"https://api.github.com/repos/parrish/Panoptes/subscription","commits_url":"https://api.github.com/repos/parrish/Panoptes/commits{/sha}","git_commits_url":"https://api.github.com/repos/parrish/Panoptes/git/commits{/sha}","comments_url":"https://api.github.com/repos/parrish/Panoptes/comments{/number}","issue_comment_url":"https://api.github.com/repos/parrish/Panoptes/issues/comments{/number}","contents_url":"https://api.github.com/repos/parrish/Panoptes/contents/{+path}","compare_url":"https://api.github.com/repos/parrish/Panoptes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/parrish/Panoptes/merges","archive_url":"https://api.github.com/repos/parrish/Panoptes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/parrish/Panoptes/downloads","issues_url":"https://api.github.com/repos/parrish/Panoptes/issues{/number}","pulls_url":"https://api.github.com/repos/parrish/Panoptes/pulls{/number}","milestones_url":"https://api.github.com/repos/parrish/Panoptes/milestones{/number}","notifications_url":"https://api.github.com/repos/parrish/Panoptes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/parrish/Panoptes/labels{/name}","releases_url":"https://api.github.com/repos/parrish/Panoptes/releases{/id}","deployments_url":"https://api.github.com/repos/parrish/Panoptes/deployments","created_at":"2014-06-25T19:38:54Z","updated_at":"2016-01-13T17:22:51Z","pushed_at":"2016-08-15T14:52:09Z","git_url":"git://github.com/parrish/Panoptes.git","ssh_url":"git@github.com:parrish/Panoptes.git","clone_url":"https://github.com/parrish/Panoptes.git","svn_url":"https://github.com/parrish/Panoptes","homepage":"","size":5773,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"zooniverse:master","ref":"master","sha":"2bf943fc2f7064a83d65d910946f2ecfea487cc2","user":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars.githubusercontent.com/u/106856?v=3","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"repo":{"id":19036577,"name":"Panoptes","full_name":"zooniverse/Panoptes","owner":{"login":"zooniverse","id":106856,"avatar_url":"https://avatars.githubusercontent.com/u/106856?v=3","gravatar_id":"","url":"https://api.github.com/users/zooniverse","html_url":"https://github.com/zooniverse","followers_url":"https://api.github.com/users/zooniverse/followers","following_url":"https://api.github.com/users/zooniverse/following{/other_user}","gists_url":"https://api.github.com/users/zooniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/zooniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zooniverse/subscriptions","organizations_url":"https://api.github.com/users/zooniverse/orgs","repos_url":"https://api.github.com/users/zooniverse/repos","events_url":"https://api.github.com/users/zooniverse/events{/privacy}","received_events_url":"https://api.github.com/users/zooniverse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zooniverse/Panoptes","description":"It sees everything","fork":false,"url":"https://api.github.com/repos/zooniverse/Panoptes","forks_url":"https://api.github.com/repos/zooniverse/Panoptes/forks","keys_url":"https://api.github.com/repos/zooniverse/Panoptes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zooniverse/Panoptes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zooniverse/Panoptes/teams","hooks_url":"https://api.github.com/repos/zooniverse/Panoptes/hooks","issue_events_url":"https://api.github.com/repos/zooniverse/Panoptes/issues/events{/number}","events_url":"https://api.github.com/repos/zooniverse/Panoptes/events","assignees_url":"https://api.github.com/repos/zooniverse/Panoptes/assignees{/user}","branches_url":"https://api.github.com/repos/zooniverse/Panoptes/branches{/branch}","tags_url":"https://api.github.com/repos/zooniverse/Panoptes/tags","blobs_url":"https://api.github.com/repos/zooniverse/Panoptes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zooniverse/Panoptes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zooniverse/Panoptes/git/refs{/sha}","trees_url":"https://api.github.com/repos/zooniverse/Panoptes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zooniverse/Panoptes/statuses/{sha}","languages_url":"https://api.github.com/repos/zooniverse/Panoptes/languages","stargazers_url":"https://api.github.com/repos/zooniverse/Panoptes/stargazers","contributors_url":"https://api.github.com/repos/zooniverse/Panoptes/contributors","subscribers_url":"https://api.github.com/repos/zooniverse/Panoptes/subscribers","subscription_url":"https://api.github.com/repos/zooniverse/Panoptes/subscription","commits_url":"https://api.github.com/repos/zooniverse/Panoptes/commits{/sha}","git_commits_url":"https://api.github.com/repos/zooniverse/Panoptes/git/commits{/sha}","comments_url":"https://api.github.com/repos/zooniverse/Panoptes/comments{/number}","issue_comment_url":"https://api.github.com/repos/zooniverse/Panoptes/issues/comments{/number}","contents_url":"https://api.github.com/repos/zooniverse/Panoptes/contents/{+path}","compare_url":"https://api.github.com/repos/zooniverse/Panoptes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zooniverse/Panoptes/merges","archive_url":"https://api.github.com/repos/zooniverse/Panoptes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zooniverse/Panoptes/downloads","issues_url":"https://api.github.com/repos/zooniverse/Panoptes/issues{/number}","pulls_url":"https://api.github.com/repos/zooniverse/Panoptes/pulls{/number}","milestones_url":"https://api.github.com/repos/zooniverse/Panoptes/milestones{/number}","notifications_url":"https://api.github.com/repos/zooniverse/Panoptes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zooniverse/Panoptes/labels{/name}","releases_url":"https://api.github.com/repos/zooniverse/Panoptes/releases{/id}","deployments_url":"https://api.github.com/repos/zooniverse/Panoptes/deployments","created_at":"2014-04-22T16:16:02Z","updated_at":"2016-08-13T23:12:26Z","pushed_at":"2016-08-15T14:52:09Z","git_url":"git://github.com/zooniverse/Panoptes.git","ssh_url":"git@github.com:zooniverse/Panoptes.git","clone_url":"https://github.com/zooniverse/Panoptes.git","svn_url":"https://github.com/zooniverse/Panoptes","homepage":"","size":6207,"stargazers_count":50,"watchers_count":50,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":109,"forks":24,"open_issues":109,"watchers":50,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1906"},"html":{"href":"https://github.com/zooniverse/Panoptes/pull/1906"},"issue":{"href":"https://api.github.com/repos/zooniverse/Panoptes/issues/1906"},"comments":{"href":"https://api.github.com/repos/zooniverse/Panoptes/issues/1906/comments"},"review_comments":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1906/comments"},"review_comment":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zooniverse/Panoptes/pulls/1906/commits"},"statuses":{"href":"https://api.github.com/repos/zooniverse/Panoptes/statuses/3befd1fe2a4888d72a3eb72687c2e1ec4d09f5e0"}}}}
{"actor":{"display_login":"parrish"}}