{"action":"created","comment":{"url":"https://api.github.com/repos/YaleSTC/reservations/pulls/comments/22568049","id":22568049,"diff_hunk":"@@ -1,86 +1,41 @@\n-# rubocop:disable ClassLength\n class ReportsController < ApplicationController\n   authorize_resource class: false\n-  # relations to build data columns ()\n-  ResRelation = Struct.new(:name, :relation, :params)\n-  # output structure (name = string, data = array, link_path = link for first\n-  # element in row)\n-  StatRow = Struct.new(:name, :data, :link_path)\n-  # info for a reservation set (building rows of data).\n-  # Pass in the array of ids and what type of ids the row of reservation is\n-  # collected by.  The link path is passed to the stat row\n-  ResSetInfo = Struct.new(:name, :id_type, :ids, :link_path)\n-  # stores the info for building columns (for the details on the reservations)\n   DetailInfo = Struct.new(:name, :table, :params)\n-\n-  # The idea I had behind reports was to be able to have relatively flexible\n-  # report building capabilities without a lot of queries collect_stat_set\n-  # builds a table in rows where each row is a set of reservations and the\n-  # relation filters the data again by column - it's useful for subgrouping\n-  # the reservations, and params lets you alter what kind of data you're\n-  # looking for assoc_details and collect_res_details take the set of\n-  # reservations, and for each reservation collect details from associated\n-  # tables, and the reservation table\n-\n-  def index # rubocop:disable MethodLength, AbcSize\n-    @res_stat_sets = []\n+  MODEL_COLUMNS = [ ['Total', :all, :count],\n+                      ['Reserved', :reserved, :count],","path":"app/controllers/reports_controller.rb","position":28,"original_position":28,"commit_id":"c7e0c074c171c80226d899ab87493c20cb31e834","original_commit_id":"c7e0c074c171c80226d899ab87493c20cb31e834","user":{"login":"mnquintana","id":823545,"avatar_url":"https://avatars.githubusercontent.com/u/823545?v=3","gravatar_id":"","url":"https://api.github.com/users/mnquintana","html_url":"https://github.com/mnquintana","followers_url":"https://api.github.com/users/mnquintana/followers","following_url":"https://api.github.com/users/mnquintana/following{/other_user}","gists_url":"https://api.github.com/users/mnquintana/gists{/gist_id}","starred_url":"https://api.github.com/users/mnquintana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mnquintana/subscriptions","organizations_url":"https://api.github.com/users/mnquintana/orgs","repos_url":"https://api.github.com/users/mnquintana/repos","events_url":"https://api.github.com/users/mnquintana/events{/privacy}","received_events_url":"https://api.github.com/users/mnquintana/received_events","type":"User","site_admin":false},"body":"Looks like an indentation slip :P","created_at":"2015-01-07T02:29:57Z","updated_at":"2015-01-07T02:29:57Z","html_url":"https://github.com/YaleSTC/reservations/pull/1087#discussion_r22568049","pull_request_url":"https://api.github.com/repos/YaleSTC/reservations/pulls/1087","_links":{"self":{"href":"https://api.github.com/repos/YaleSTC/reservations/pulls/comments/22568049"},"html":{"href":"https://github.com/YaleSTC/reservations/pull/1087#discussion_r22568049"},"pull_request":{"href":"https://api.github.com/repos/YaleSTC/reservations/pulls/1087"}}},"pull_request":{"url":"https://api.github.com/repos/YaleSTC/reservations/pulls/1087","id":26932923,"html_url":"https://github.com/YaleSTC/reservations/pull/1087","diff_url":"https://github.com/YaleSTC/reservations/pull/1087.diff","patch_url":"https://github.com/YaleSTC/reservations/pull/1087.patch","issue_url":"https://api.github.com/repos/YaleSTC/reservations/issues/1087","number":1087,"state":"open","locked":false,"title":"Reports","user":{"login":"squidgetx","id":6618711,"avatar_url":"https://avatars.githubusercontent.com/u/6618711?v=3","gravatar_id":"","url":"https://api.github.com/users/squidgetx","html_url":"https://github.com/squidgetx","followers_url":"https://api.github.com/users/squidgetx/followers","following_url":"https://api.github.com/users/squidgetx/following{/other_user}","gists_url":"https://api.github.com/users/squidgetx/gists{/gist_id}","starred_url":"https://api.github.com/users/squidgetx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/squidgetx/subscriptions","organizations_url":"https://api.github.com/users/squidgetx/orgs","repos_url":"https://api.github.com/users/squidgetx/repos","events_url":"https://api.github.com/users/squidgetx/events{/privacy}","received_events_url":"https://api.github.com/users/squidgetx/received_events","type":"User","site_admin":false},"body":"Resolves #994 \r\nTotal overhaul of reports for readability, more power, and introduction of some tests","created_at":"2015-01-07T01:58:22Z","updated_at":"2015-01-07T02:29:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7dfa4f6a850c79389a9c40e9960554ccebdd1dd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/YaleSTC/reservations/pulls/1087/commits","review_comments_url":"https://api.github.com/repos/YaleSTC/reservations/pulls/1087/comments","review_comment_url":"https://api.github.com/repos/YaleSTC/reservations/pulls/comments/{number}","comments_url":"https://api.github.com/repos/YaleSTC/reservations/issues/1087/comments","statuses_url":"https://api.github.com/repos/YaleSTC/reservations/statuses/c7e0c074c171c80226d899ab87493c20cb31e834","head":{"label":"YaleSTC:reports","ref":"reports","sha":"c7e0c074c171c80226d899ab87493c20cb31e834","user":{"login":"YaleSTC","id":106094,"avatar_url":"https://avatars.githubusercontent.com/u/106094?v=3","gravatar_id":"","url":"https://api.github.com/users/YaleSTC","html_url":"https://github.com/YaleSTC","followers_url":"https://api.github.com/users/YaleSTC/followers","following_url":"https://api.github.com/users/YaleSTC/following{/other_user}","gists_url":"https://api.github.com/users/YaleSTC/gists{/gist_id}","starred_url":"https://api.github.com/users/YaleSTC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YaleSTC/subscriptions","organizations_url":"https://api.github.com/users/YaleSTC/orgs","repos_url":"https://api.github.com/users/YaleSTC/repos","events_url":"https://api.github.com/users/YaleSTC/events{/privacy}","received_events_url":"https://api.github.com/users/YaleSTC/received_events","type":"Organization","site_admin":false},"repo":{"id":345280,"name":"reservations","full_name":"YaleSTC/reservations","owner":{"login":"YaleSTC","id":106094,"avatar_url":"https://avatars.githubusercontent.com/u/106094?v=3","gravatar_id":"","url":"https://api.github.com/users/YaleSTC","html_url":"https://github.com/YaleSTC","followers_url":"https://api.github.com/users/YaleSTC/followers","following_url":"https://api.github.com/users/YaleSTC/following{/other_user}","gists_url":"https://api.github.com/users/YaleSTC/gists{/gist_id}","starred_url":"https://api.github.com/users/YaleSTC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YaleSTC/subscriptions","organizations_url":"https://api.github.com/users/YaleSTC/orgs","repos_url":"https://api.github.com/users/YaleSTC/repos","events_url":"https://api.github.com/users/YaleSTC/events{/privacy}","received_events_url":"https://api.github.com/users/YaleSTC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/YaleSTC/reservations","description":"Manage equipment loans & reservations. Who can borrow what, for how long?","fork":false,"url":"https://api.github.com/repos/YaleSTC/reservations","forks_url":"https://api.github.com/repos/YaleSTC/reservations/forks","keys_url":"https://api.github.com/repos/YaleSTC/reservations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/YaleSTC/reservations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/YaleSTC/reservations/teams","hooks_url":"https://api.github.com/repos/YaleSTC/reservations/hooks","issue_events_url":"https://api.github.com/repos/YaleSTC/reservations/issues/events{/number}","events_url":"https://api.github.com/repos/YaleSTC/reservations/events","assignees_url":"https://api.github.com/repos/YaleSTC/reservations/assignees{/user}","branches_url":"https://api.github.com/repos/YaleSTC/reservations/branches{/branch}","tags_url":"https://api.github.com/repos/YaleSTC/reservations/tags","blobs_url":"https://api.github.com/repos/YaleSTC/reservations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/YaleSTC/reservations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/YaleSTC/reservations/git/refs{/sha}","trees_url":"https://api.github.com/repos/YaleSTC/reservations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/YaleSTC/reservations/statuses/{sha}","languages_url":"https://api.github.com/repos/YaleSTC/reservations/languages","stargazers_url":"https://api.github.com/repos/YaleSTC/reservations/stargazers","contributors_url":"https://api.github.com/repos/YaleSTC/reservations/contributors","subscribers_url":"https://api.github.com/repos/YaleSTC/reservations/subscribers","subscription_url":"https://api.github.com/repos/YaleSTC/reservations/subscription","commits_url":"https://api.github.com/repos/YaleSTC/reservations/commits{/sha}","git_commits_url":"https://api.github.com/repos/YaleSTC/reservations/git/commits{/sha}","comments_url":"https://api.github.com/repos/YaleSTC/reservations/comments{/number}","issue_comment_url":"https://api.github.com/repos/YaleSTC/reservations/issues/comments/{number}","contents_url":"https://api.github.com/repos/YaleSTC/reservations/contents/{+path}","compare_url":"https://api.github.com/repos/YaleSTC/reservations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/YaleSTC/reservations/merges","archive_url":"https://api.github.com/repos/YaleSTC/reservations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/YaleSTC/reservations/downloads","issues_url":"https://api.github.com/repos/YaleSTC/reservations/issues{/number}","pulls_url":"https://api.github.com/repos/YaleSTC/reservations/pulls{/number}","milestones_url":"https://api.github.com/repos/YaleSTC/reservations/milestones{/number}","notifications_url":"https://api.github.com/repos/YaleSTC/reservations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/YaleSTC/reservations/labels{/name}","releases_url":"https://api.github.com/repos/YaleSTC/reservations/releases{/id}","created_at":"2009-10-21T21:08:00Z","updated_at":"2015-01-06T21:40:42Z","pushed_at":"2015-01-07T02:24:18Z","git_url":"git://github.com/YaleSTC/reservations.git","ssh_url":"git@github.com:YaleSTC/reservations.git","clone_url":"https://github.com/YaleSTC/reservations.git","svn_url":"https://github.com/YaleSTC/reservations","homepage":"yalestc.github.io/reservations","size":53100,"stargazers_count":31,"watchers_count":31,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":117,"forks":14,"open_issues":117,"watchers":31,"default_branch":"master"}},"base":{"label":"YaleSTC:master","ref":"master","sha":"4433e5015411fe9a2c306f4870222c35aa5e1bce","user":{"login":"YaleSTC","id":106094,"avatar_url":"https://avatars.githubusercontent.com/u/106094?v=3","gravatar_id":"","url":"https://api.github.com/users/YaleSTC","html_url":"https://github.com/YaleSTC","followers_url":"https://api.github.com/users/YaleSTC/followers","following_url":"https://api.github.com/users/YaleSTC/following{/other_user}","gists_url":"https://api.github.com/users/YaleSTC/gists{/gist_id}","starred_url":"https://api.github.com/users/YaleSTC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YaleSTC/subscriptions","organizations_url":"https://api.github.com/users/YaleSTC/orgs","repos_url":"https://api.github.com/users/YaleSTC/repos","events_url":"https://api.github.com/users/YaleSTC/events{/privacy}","received_events_url":"https://api.github.com/users/YaleSTC/received_events","type":"Organization","site_admin":false},"repo":{"id":345280,"name":"reservations","full_name":"YaleSTC/reservations","owner":{"login":"YaleSTC","id":106094,"avatar_url":"https://avatars.githubusercontent.com/u/106094?v=3","gravatar_id":"","url":"https://api.github.com/users/YaleSTC","html_url":"https://github.com/YaleSTC","followers_url":"https://api.github.com/users/YaleSTC/followers","following_url":"https://api.github.com/users/YaleSTC/following{/other_user}","gists_url":"https://api.github.com/users/YaleSTC/gists{/gist_id}","starred_url":"https://api.github.com/users/YaleSTC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/YaleSTC/subscriptions","organizations_url":"https://api.github.com/users/YaleSTC/orgs","repos_url":"https://api.github.com/users/YaleSTC/repos","events_url":"https://api.github.com/users/YaleSTC/events{/privacy}","received_events_url":"https://api.github.com/users/YaleSTC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/YaleSTC/reservations","description":"Manage equipment loans & reservations. Who can borrow what, for how long?","fork":false,"url":"https://api.github.com/repos/YaleSTC/reservations","forks_url":"https://api.github.com/repos/YaleSTC/reservations/forks","keys_url":"https://api.github.com/repos/YaleSTC/reservations/keys{/key_id}","collaborators_url":"https://api.github.com/repos/YaleSTC/reservations/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/YaleSTC/reservations/teams","hooks_url":"https://api.github.com/repos/YaleSTC/reservations/hooks","issue_events_url":"https://api.github.com/repos/YaleSTC/reservations/issues/events{/number}","events_url":"https://api.github.com/repos/YaleSTC/reservations/events","assignees_url":"https://api.github.com/repos/YaleSTC/reservations/assignees{/user}","branches_url":"https://api.github.com/repos/YaleSTC/reservations/branches{/branch}","tags_url":"https://api.github.com/repos/YaleSTC/reservations/tags","blobs_url":"https://api.github.com/repos/YaleSTC/reservations/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/YaleSTC/reservations/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/YaleSTC/reservations/git/refs{/sha}","trees_url":"https://api.github.com/repos/YaleSTC/reservations/git/trees{/sha}","statuses_url":"https://api.github.com/repos/YaleSTC/reservations/statuses/{sha}","languages_url":"https://api.github.com/repos/YaleSTC/reservations/languages","stargazers_url":"https://api.github.com/repos/YaleSTC/reservations/stargazers","contributors_url":"https://api.github.com/repos/YaleSTC/reservations/contributors","subscribers_url":"https://api.github.com/repos/YaleSTC/reservations/subscribers","subscription_url":"https://api.github.com/repos/YaleSTC/reservations/subscription","commits_url":"https://api.github.com/repos/YaleSTC/reservations/commits{/sha}","git_commits_url":"https://api.github.com/repos/YaleSTC/reservations/git/commits{/sha}","comments_url":"https://api.github.com/repos/YaleSTC/reservations/comments{/number}","issue_comment_url":"https://api.github.com/repos/YaleSTC/reservations/issues/comments/{number}","contents_url":"https://api.github.com/repos/YaleSTC/reservations/contents/{+path}","compare_url":"https://api.github.com/repos/YaleSTC/reservations/compare/{base}...{head}","merges_url":"https://api.github.com/repos/YaleSTC/reservations/merges","archive_url":"https://api.github.com/repos/YaleSTC/reservations/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/YaleSTC/reservations/downloads","issues_url":"https://api.github.com/repos/YaleSTC/reservations/issues{/number}","pulls_url":"https://api.github.com/repos/YaleSTC/reservations/pulls{/number}","milestones_url":"https://api.github.com/repos/YaleSTC/reservations/milestones{/number}","notifications_url":"https://api.github.com/repos/YaleSTC/reservations/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/YaleSTC/reservations/labels{/name}","releases_url":"https://api.github.com/repos/YaleSTC/reservations/releases{/id}","created_at":"2009-10-21T21:08:00Z","updated_at":"2015-01-06T21:40:42Z","pushed_at":"2015-01-07T02:24:18Z","git_url":"git://github.com/YaleSTC/reservations.git","ssh_url":"git@github.com:YaleSTC/reservations.git","clone_url":"https://github.com/YaleSTC/reservations.git","svn_url":"https://github.com/YaleSTC/reservations","homepage":"yalestc.github.io/reservations","size":53100,"stargazers_count":31,"watchers_count":31,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":14,"mirror_url":null,"open_issues_count":117,"forks":14,"open_issues":117,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/YaleSTC/reservations/pulls/1087"},"html":{"href":"https://github.com/YaleSTC/reservations/pull/1087"},"issue":{"href":"https://api.github.com/repos/YaleSTC/reservations/issues/1087"},"comments":{"href":"https://api.github.com/repos/YaleSTC/reservations/issues/1087/comments"},"review_comments":{"href":"https://api.github.com/repos/YaleSTC/reservations/pulls/1087/comments"},"review_comment":{"href":"https://api.github.com/repos/YaleSTC/reservations/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/YaleSTC/reservations/pulls/1087/commits"},"statuses":{"href":"https://api.github.com/repos/YaleSTC/reservations/statuses/c7e0c074c171c80226d899ab87493c20cb31e834"}}}}