{"action":"created","comment":{"url":"https://api.github.com/repos/AgileVentures/shf-project/pulls/comments/91632469","pull_request_review_id":12140177,"id":91632469,"diff_hunk":"@@ -4,5 +4,10 @@ def company_complete? company\n     !company.nil? && !company.name.nil? && !company.name.empty? &&\n       !company.region.nil? && !company.region.empty?\n   end\n-\n+  def list_categories company","path":"app/helpers/companies_helper.rb","position":5,"original_position":5,"commit_id":"c7794f146c073688f59bf5af5088bdd835410ce2","original_commit_id":"c7794f146c073688f59bf5af5088bdd835410ce2","user":{"login":"weedySeaDragon","id":673794,"avatar_url":"https://avatars.githubusercontent.com/u/673794?v=3","gravatar_id":"","url":"https://api.github.com/users/weedySeaDragon","html_url":"https://github.com/weedySeaDragon","followers_url":"https://api.github.com/users/weedySeaDragon/followers","following_url":"https://api.github.com/users/weedySeaDragon/following{/other_user}","gists_url":"https://api.github.com/users/weedySeaDragon/gists{/gist_id}","starred_url":"https://api.github.com/users/weedySeaDragon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weedySeaDragon/subscriptions","organizations_url":"https://api.github.com/users/weedySeaDragon/orgs","repos_url":"https://api.github.com/users/weedySeaDragon/repos","events_url":"https://api.github.com/users/weedySeaDragon/events{/privacy}","received_events_url":"https://api.github.com/users/weedySeaDragon/received_events","type":"User","site_admin":false},"body":"I'm not sure what you're trying to accomplish.\r\nThis will just return the name of the last category for one single member application.\r\n\r\nIf a company has multiple categories, then what about all of the other categories?  IOW, what is so special about the _last_ category?\r\n\r\nWhy are you looking up a company by a membership application?\r\nThis is being used on the list of companies view.  Why not just get the information from each company directly?  ex: `company.categories` ?\r\n\r\nI'm not sure exactly what you're trying to do, so I don't know you should be working with `company.categories` or not.  Can you clarify what it is that you want to see in PT?  ","created_at":"2016-12-08T23:39:06Z","updated_at":"2016-12-08T23:39:12Z","html_url":"https://github.com/AgileVentures/shf-project/pull/71#discussion_r91632469","pull_request_url":"https://api.github.com/repos/AgileVentures/shf-project/pulls/71","_links":{"self":{"href":"https://api.github.com/repos/AgileVentures/shf-project/pulls/comments/91632469"},"html":{"href":"https://github.com/AgileVentures/shf-project/pull/71#discussion_r91632469"},"pull_request":{"href":"https://api.github.com/repos/AgileVentures/shf-project/pulls/71"}}},"pull_request":{"url":"https://api.github.com/repos/AgileVentures/shf-project/pulls/71","id":97142356,"html_url":"https://github.com/AgileVentures/shf-project/pull/71","diff_url":"https://github.com/AgileVentures/shf-project/pull/71.diff","patch_url":"https://github.com/AgileVentures/shf-project/pull/71.patch","issue_url":"https://api.github.com/repos/AgileVentures/shf-project/issues/71","number":71,"state":"open","locked":false,"title":"Lists categories on index with helper","user":{"login":"thesuss","id":7266909,"avatar_url":"https://avatars.githubusercontent.com/u/7266909?v=3","gravatar_id":"","url":"https://api.github.com/users/thesuss","html_url":"https://github.com/thesuss","followers_url":"https://api.github.com/users/thesuss/followers","following_url":"https://api.github.com/users/thesuss/following{/other_user}","gists_url":"https://api.github.com/users/thesuss/gists{/gist_id}","starred_url":"https://api.github.com/users/thesuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thesuss/subscriptions","organizations_url":"https://api.github.com/users/thesuss/orgs","repos_url":"https://api.github.com/users/thesuss/repos","events_url":"https://api.github.com/users/thesuss/events{/privacy}","received_events_url":"https://api.github.com/users/thesuss/received_events","type":"User","site_admin":false},"body":"PT Story: https://www.pivotaltracker.com/story/show/135781127\r\n\r\nProbably the helper can be refactored. . \r\n\r\nChanges: \r\n- A listed company must belong to an application in order to show categories\r\n- Helper to list company last category\r\n- Amended tests to match\r\n- Spec tests for helper\r\n","created_at":"2016-12-08T15:27:17Z","updated_at":"2016-12-08T23:39:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8db224ace9b452d962a7c2c9eb142e89b96da14","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/AgileVentures/shf-project/pulls/71/commits","review_comments_url":"https://api.github.com/repos/AgileVentures/shf-project/pulls/71/comments","review_comment_url":"https://api.github.com/repos/AgileVentures/shf-project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AgileVentures/shf-project/issues/71/comments","statuses_url":"https://api.github.com/repos/AgileVentures/shf-project/statuses/c7794f146c073688f59bf5af5088bdd835410ce2","head":{"label":"thesuss:hide-org-nr","ref":"hide-org-nr","sha":"c7794f146c073688f59bf5af5088bdd835410ce2","user":{"login":"thesuss","id":7266909,"avatar_url":"https://avatars.githubusercontent.com/u/7266909?v=3","gravatar_id":"","url":"https://api.github.com/users/thesuss","html_url":"https://github.com/thesuss","followers_url":"https://api.github.com/users/thesuss/followers","following_url":"https://api.github.com/users/thesuss/following{/other_user}","gists_url":"https://api.github.com/users/thesuss/gists{/gist_id}","starred_url":"https://api.github.com/users/thesuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thesuss/subscriptions","organizations_url":"https://api.github.com/users/thesuss/orgs","repos_url":"https://api.github.com/users/thesuss/repos","events_url":"https://api.github.com/users/thesuss/events{/privacy}","received_events_url":"https://api.github.com/users/thesuss/received_events","type":"User","site_admin":false},"repo":{"id":65629235,"name":"shf-project","full_name":"thesuss/shf-project","owner":{"login":"thesuss","id":7266909,"avatar_url":"https://avatars.githubusercontent.com/u/7266909?v=3","gravatar_id":"","url":"https://api.github.com/users/thesuss","html_url":"https://github.com/thesuss","followers_url":"https://api.github.com/users/thesuss/followers","following_url":"https://api.github.com/users/thesuss/following{/other_user}","gists_url":"https://api.github.com/users/thesuss/gists{/gist_id}","starred_url":"https://api.github.com/users/thesuss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thesuss/subscriptions","organizations_url":"https://api.github.com/users/thesuss/orgs","repos_url":"https://api.github.com/users/thesuss/repos","events_url":"https://api.github.com/users/thesuss/events{/privacy}","received_events_url":"https://api.github.com/users/thesuss/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thesuss/shf-project","description":"This is the repo for what will be membership handling of Sveriges Hundföretagare","fork":false,"url":"https://api.github.com/repos/thesuss/shf-project","forks_url":"https://api.github.com/repos/thesuss/shf-project/forks","keys_url":"https://api.github.com/repos/thesuss/shf-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thesuss/shf-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thesuss/shf-project/teams","hooks_url":"https://api.github.com/repos/thesuss/shf-project/hooks","issue_events_url":"https://api.github.com/repos/thesuss/shf-project/issues/events{/number}","events_url":"https://api.github.com/repos/thesuss/shf-project/events","assignees_url":"https://api.github.com/repos/thesuss/shf-project/assignees{/user}","branches_url":"https://api.github.com/repos/thesuss/shf-project/branches{/branch}","tags_url":"https://api.github.com/repos/thesuss/shf-project/tags","blobs_url":"https://api.github.com/repos/thesuss/shf-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thesuss/shf-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thesuss/shf-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/thesuss/shf-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thesuss/shf-project/statuses/{sha}","languages_url":"https://api.github.com/repos/thesuss/shf-project/languages","stargazers_url":"https://api.github.com/repos/thesuss/shf-project/stargazers","contributors_url":"https://api.github.com/repos/thesuss/shf-project/contributors","subscribers_url":"https://api.github.com/repos/thesuss/shf-project/subscribers","subscription_url":"https://api.github.com/repos/thesuss/shf-project/subscription","commits_url":"https://api.github.com/repos/thesuss/shf-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/thesuss/shf-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/thesuss/shf-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/thesuss/shf-project/issues/comments{/number}","contents_url":"https://api.github.com/repos/thesuss/shf-project/contents/{+path}","compare_url":"https://api.github.com/repos/thesuss/shf-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thesuss/shf-project/merges","archive_url":"https://api.github.com/repos/thesuss/shf-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thesuss/shf-project/downloads","issues_url":"https://api.github.com/repos/thesuss/shf-project/issues{/number}","pulls_url":"https://api.github.com/repos/thesuss/shf-project/pulls{/number}","milestones_url":"https://api.github.com/repos/thesuss/shf-project/milestones{/number}","notifications_url":"https://api.github.com/repos/thesuss/shf-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thesuss/shf-project/labels{/name}","releases_url":"https://api.github.com/repos/thesuss/shf-project/releases{/id}","deployments_url":"https://api.github.com/repos/thesuss/shf-project/deployments","created_at":"2016-08-13T17:38:08Z","updated_at":"2016-10-22T10:45:07Z","pushed_at":"2016-12-08T15:54:28Z","git_url":"git://github.com/thesuss/shf-project.git","ssh_url":"git@github.com:thesuss/shf-project.git","clone_url":"https://github.com/thesuss/shf-project.git","svn_url":"https://github.com/thesuss/shf-project","homepage":"http://www.sverigeshundforetagare.se","size":1533,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":1,"forks":10,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"AgileVentures:develop","ref":"develop","sha":"8403156f298998fcafca290f5c087c29f44ee8b9","user":{"login":"AgileVentures","id":5116968,"avatar_url":"https://avatars.githubusercontent.com/u/5116968?v=3","gravatar_id":"","url":"https://api.github.com/users/AgileVentures","html_url":"https://github.com/AgileVentures","followers_url":"https://api.github.com/users/AgileVentures/followers","following_url":"https://api.github.com/users/AgileVentures/following{/other_user}","gists_url":"https://api.github.com/users/AgileVentures/gists{/gist_id}","starred_url":"https://api.github.com/users/AgileVentures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgileVentures/subscriptions","organizations_url":"https://api.github.com/users/AgileVentures/orgs","repos_url":"https://api.github.com/users/AgileVentures/repos","events_url":"https://api.github.com/users/AgileVentures/events{/privacy}","received_events_url":"https://api.github.com/users/AgileVentures/received_events","type":"Organization","site_admin":false},"repo":{"id":71157737,"name":"shf-project","full_name":"AgileVentures/shf-project","owner":{"login":"AgileVentures","id":5116968,"avatar_url":"https://avatars.githubusercontent.com/u/5116968?v=3","gravatar_id":"","url":"https://api.github.com/users/AgileVentures","html_url":"https://github.com/AgileVentures","followers_url":"https://api.github.com/users/AgileVentures/followers","following_url":"https://api.github.com/users/AgileVentures/following{/other_user}","gists_url":"https://api.github.com/users/AgileVentures/gists{/gist_id}","starred_url":"https://api.github.com/users/AgileVentures/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AgileVentures/subscriptions","organizations_url":"https://api.github.com/users/AgileVentures/orgs","repos_url":"https://api.github.com/users/AgileVentures/repos","events_url":"https://api.github.com/users/AgileVentures/events{/privacy}","received_events_url":"https://api.github.com/users/AgileVentures/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AgileVentures/shf-project","description":null,"fork":true,"url":"https://api.github.com/repos/AgileVentures/shf-project","forks_url":"https://api.github.com/repos/AgileVentures/shf-project/forks","keys_url":"https://api.github.com/repos/AgileVentures/shf-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AgileVentures/shf-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AgileVentures/shf-project/teams","hooks_url":"https://api.github.com/repos/AgileVentures/shf-project/hooks","issue_events_url":"https://api.github.com/repos/AgileVentures/shf-project/issues/events{/number}","events_url":"https://api.github.com/repos/AgileVentures/shf-project/events","assignees_url":"https://api.github.com/repos/AgileVentures/shf-project/assignees{/user}","branches_url":"https://api.github.com/repos/AgileVentures/shf-project/branches{/branch}","tags_url":"https://api.github.com/repos/AgileVentures/shf-project/tags","blobs_url":"https://api.github.com/repos/AgileVentures/shf-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AgileVentures/shf-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AgileVentures/shf-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/AgileVentures/shf-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AgileVentures/shf-project/statuses/{sha}","languages_url":"https://api.github.com/repos/AgileVentures/shf-project/languages","stargazers_url":"https://api.github.com/repos/AgileVentures/shf-project/stargazers","contributors_url":"https://api.github.com/repos/AgileVentures/shf-project/contributors","subscribers_url":"https://api.github.com/repos/AgileVentures/shf-project/subscribers","subscription_url":"https://api.github.com/repos/AgileVentures/shf-project/subscription","commits_url":"https://api.github.com/repos/AgileVentures/shf-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/AgileVentures/shf-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/AgileVentures/shf-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/AgileVentures/shf-project/issues/comments{/number}","contents_url":"https://api.github.com/repos/AgileVentures/shf-project/contents/{+path}","compare_url":"https://api.github.com/repos/AgileVentures/shf-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AgileVentures/shf-project/merges","archive_url":"https://api.github.com/repos/AgileVentures/shf-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AgileVentures/shf-project/downloads","issues_url":"https://api.github.com/repos/AgileVentures/shf-project/issues{/number}","pulls_url":"https://api.github.com/repos/AgileVentures/shf-project/pulls{/number}","milestones_url":"https://api.github.com/repos/AgileVentures/shf-project/milestones{/number}","notifications_url":"https://api.github.com/repos/AgileVentures/shf-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AgileVentures/shf-project/labels{/name}","releases_url":"https://api.github.com/repos/AgileVentures/shf-project/releases{/id}","deployments_url":"https://api.github.com/repos/AgileVentures/shf-project/deployments","created_at":"2016-10-17T16:18:10Z","updated_at":"2016-12-02T13:34:05Z","pushed_at":"2016-12-08T22:53:15Z","git_url":"git://github.com/AgileVentures/shf-project.git","ssh_url":"git@github.com:AgileVentures/shf-project.git","clone_url":"https://github.com/AgileVentures/shf-project.git","svn_url":"https://github.com/AgileVentures/shf-project","homepage":null,"size":1696,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":2,"forks":9,"open_issues":2,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/AgileVentures/shf-project/pulls/71"},"html":{"href":"https://github.com/AgileVentures/shf-project/pull/71"},"issue":{"href":"https://api.github.com/repos/AgileVentures/shf-project/issues/71"},"comments":{"href":"https://api.github.com/repos/AgileVentures/shf-project/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/AgileVentures/shf-project/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/AgileVentures/shf-project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AgileVentures/shf-project/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/AgileVentures/shf-project/statuses/c7794f146c073688f59bf5af5088bdd835410ce2"}}}}
{"actor":{"display_login":"weedySeaDragon"}}