{"action":"created","comment":{"url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/pulls/comments/105201364","pull_request_review_id":26069276,"id":105201364,"diff_hunk":"@@ -31,7 +31,10 @@ def show\n   def current\n     letter_data = Parliament::Request.new.constituencies.current.a_z_letters.get\n \n-    @constituencies = Parliament::Request.new.constituencies.current.get.sort_by(:name)\n+    data = Parliament::Request.new.constituencies.current.get\n+\n+    @constituencies = data.filter('http://id.ukpds.org/schema/ConstituencyGroup')\n+    @constituencies = @constituencies.sort_by(:name)","path":"app/controllers/constituencies_controller.rb","position":8,"original_position":8,"commit_id":"864bc73128d0784a29203d0676cb5019cceb13b5","original_commit_id":"afaf033f9abcf0c5062584d875ca50b67738b12a","user":{"login":"katylouise","id":8373317,"avatar_url":"https://avatars0.githubusercontent.com/u/8373317?v=3","gravatar_id":"","url":"https://api.github.com/users/katylouise","html_url":"https://github.com/katylouise","followers_url":"https://api.github.com/users/katylouise/followers","following_url":"https://api.github.com/users/katylouise/following{/other_user}","gists_url":"https://api.github.com/users/katylouise/gists{/gist_id}","starred_url":"https://api.github.com/users/katylouise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katylouise/subscriptions","organizations_url":"https://api.github.com/users/katylouise/orgs","repos_url":"https://api.github.com/users/katylouise/repos","events_url":"https://api.github.com/users/katylouise/events{/privacy}","received_events_url":"https://api.github.com/users/katylouise/received_events","type":"User","site_admin":false},"body":"I've had a think about this and I'm not sure how I would do this.  When we filter, we loop through the nodes and push them into the correct array depending on their type.  If we wanted to sort at the same time, I think we would still have to loop through each existing array to sort the name node being added to the correct place.  Would this make things quicker?","created_at":"2017-03-09T16:08:12Z","updated_at":"2017-03-09T16:08:13Z","html_url":"https://github.com/ukparliament/parliament.uk-prototype/pull/274#discussion_r105201364","pull_request_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/pulls/274","_links":{"self":{"href":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/pulls/comments/105201364"},"html":{"href":"https://github.com/ukparliament/parliament.uk-prototype/pull/274#discussion_r105201364"},"pull_request":{"href":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/pulls/274"}}},"pull_request":{"url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/pulls/274","id":109921489,"html_url":"https://github.com/ukparliament/parliament.uk-prototype/pull/274","diff_url":"https://github.com/ukparliament/parliament.uk-prototype/pull/274.diff","patch_url":"https://github.com/ukparliament/parliament.uk-prototype/pull/274.patch","issue_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/issues/274","number":274,"state":"open","locked":false,"title":"[WEBSITE-689] Updated views and controllers to accommodate current/historical disambiguation","user":{"login":"katylouise","id":8373317,"avatar_url":"https://avatars0.githubusercontent.com/u/8373317?v=3","gravatar_id":"","url":"https://api.github.com/users/katylouise","html_url":"https://github.com/katylouise","followers_url":"https://api.github.com/users/katylouise/followers","following_url":"https://api.github.com/users/katylouise/following{/other_user}","gists_url":"https://api.github.com/users/katylouise/gists{/gist_id}","starred_url":"https://api.github.com/users/katylouise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katylouise/subscriptions","organizations_url":"https://api.github.com/users/katylouise/orgs","repos_url":"https://api.github.com/users/katylouise/repos","events_url":"https://api.github.com/users/katylouise/events{/privacy}","received_events_url":"https://api.github.com/users/katylouise/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-03-09T14:13:15Z","updated_at":"2017-03-09T16:08:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"37fba4358c6fc9df7874a7fe459760b9bb1463cb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/pulls/274/commits","review_comments_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/pulls/274/comments","review_comment_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/issues/274/comments","statuses_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/statuses/864bc73128d0784a29203d0676cb5019cceb13b5","head":{"label":"katylouise:katylouise/website-689_current-historical-distinction","ref":"katylouise/website-689_current-historical-distinction","sha":"864bc73128d0784a29203d0676cb5019cceb13b5","user":{"login":"katylouise","id":8373317,"avatar_url":"https://avatars0.githubusercontent.com/u/8373317?v=3","gravatar_id":"","url":"https://api.github.com/users/katylouise","html_url":"https://github.com/katylouise","followers_url":"https://api.github.com/users/katylouise/followers","following_url":"https://api.github.com/users/katylouise/following{/other_user}","gists_url":"https://api.github.com/users/katylouise/gists{/gist_id}","starred_url":"https://api.github.com/users/katylouise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katylouise/subscriptions","organizations_url":"https://api.github.com/users/katylouise/orgs","repos_url":"https://api.github.com/users/katylouise/repos","events_url":"https://api.github.com/users/katylouise/events{/privacy}","received_events_url":"https://api.github.com/users/katylouise/received_events","type":"User","site_admin":false},"repo":{"id":82546660,"name":"parliament.uk-prototype","full_name":"katylouise/parliament.uk-prototype","owner":{"login":"katylouise","id":8373317,"avatar_url":"https://avatars0.githubusercontent.com/u/8373317?v=3","gravatar_id":"","url":"https://api.github.com/users/katylouise","html_url":"https://github.com/katylouise","followers_url":"https://api.github.com/users/katylouise/followers","following_url":"https://api.github.com/users/katylouise/following{/other_user}","gists_url":"https://api.github.com/users/katylouise/gists{/gist_id}","starred_url":"https://api.github.com/users/katylouise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katylouise/subscriptions","organizations_url":"https://api.github.com/users/katylouise/orgs","repos_url":"https://api.github.com/users/katylouise/repos","events_url":"https://api.github.com/users/katylouise/events{/privacy}","received_events_url":"https://api.github.com/users/katylouise/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/katylouise/parliament.uk-prototype","description":null,"fork":true,"url":"https://api.github.com/repos/katylouise/parliament.uk-prototype","forks_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/forks","keys_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/keys{/key_id}","collaborators_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/teams","hooks_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/hooks","issue_events_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/issues/events{/number}","events_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/events","assignees_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/assignees{/user}","branches_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/branches{/branch}","tags_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/tags","blobs_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/git/refs{/sha}","trees_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/git/trees{/sha}","statuses_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/statuses/{sha}","languages_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/languages","stargazers_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/stargazers","contributors_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/contributors","subscribers_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/subscribers","subscription_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/subscription","commits_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/commits{/sha}","git_commits_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/git/commits{/sha}","comments_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/comments{/number}","issue_comment_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/issues/comments{/number}","contents_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/contents/{+path}","compare_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/compare/{base}...{head}","merges_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/merges","archive_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/downloads","issues_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/issues{/number}","pulls_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/pulls{/number}","milestones_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/milestones{/number}","notifications_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/labels{/name}","releases_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/releases{/id}","deployments_url":"https://api.github.com/repos/katylouise/parliament.uk-prototype/deployments","created_at":"2017-02-20T10:39:17Z","updated_at":"2017-02-20T10:39:20Z","pushed_at":"2017-03-09T14:44:39Z","git_url":"git://github.com/katylouise/parliament.uk-prototype.git","ssh_url":"git@github.com:katylouise/parliament.uk-prototype.git","clone_url":"https://github.com/katylouise/parliament.uk-prototype.git","svn_url":"https://github.com/katylouise/parliament.uk-prototype","homepage":null,"size":1428,"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":"development"}},"base":{"label":"ukparliament:development","ref":"development","sha":"4587a46e39b04c320ce4a045ad5bceca4e4ccd58","user":{"login":"ukparliament","id":7130076,"avatar_url":"https://avatars0.githubusercontent.com/u/7130076?v=3","gravatar_id":"","url":"https://api.github.com/users/ukparliament","html_url":"https://github.com/ukparliament","followers_url":"https://api.github.com/users/ukparliament/followers","following_url":"https://api.github.com/users/ukparliament/following{/other_user}","gists_url":"https://api.github.com/users/ukparliament/gists{/gist_id}","starred_url":"https://api.github.com/users/ukparliament/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ukparliament/subscriptions","organizations_url":"https://api.github.com/users/ukparliament/orgs","repos_url":"https://api.github.com/users/ukparliament/repos","events_url":"https://api.github.com/users/ukparliament/events{/privacy}","received_events_url":"https://api.github.com/users/ukparliament/received_events","type":"Organization","site_admin":false},"repo":{"id":67591227,"name":"parliament.uk-prototype","full_name":"ukparliament/parliament.uk-prototype","owner":{"login":"ukparliament","id":7130076,"avatar_url":"https://avatars0.githubusercontent.com/u/7130076?v=3","gravatar_id":"","url":"https://api.github.com/users/ukparliament","html_url":"https://github.com/ukparliament","followers_url":"https://api.github.com/users/ukparliament/followers","following_url":"https://api.github.com/users/ukparliament/following{/other_user}","gists_url":"https://api.github.com/users/ukparliament/gists{/gist_id}","starred_url":"https://api.github.com/users/ukparliament/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ukparliament/subscriptions","organizations_url":"https://api.github.com/users/ukparliament/orgs","repos_url":"https://api.github.com/users/ukparliament/repos","events_url":"https://api.github.com/users/ukparliament/events{/privacy}","received_events_url":"https://api.github.com/users/ukparliament/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ukparliament/parliament.uk-prototype","description":null,"fork":false,"url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype","forks_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/forks","keys_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/teams","hooks_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/hooks","issue_events_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/issues/events{/number}","events_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/events","assignees_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/assignees{/user}","branches_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/branches{/branch}","tags_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/tags","blobs_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/git/refs{/sha}","trees_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/statuses/{sha}","languages_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/languages","stargazers_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/stargazers","contributors_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/contributors","subscribers_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/subscribers","subscription_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/subscription","commits_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/commits{/sha}","git_commits_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/git/commits{/sha}","comments_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/comments{/number}","issue_comment_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/issues/comments{/number}","contents_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/contents/{+path}","compare_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/merges","archive_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/downloads","issues_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/issues{/number}","pulls_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/pulls{/number}","milestones_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/milestones{/number}","notifications_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/labels{/name}","releases_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/releases{/id}","deployments_url":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/deployments","created_at":"2016-09-07T09:13:09Z","updated_at":"2017-02-17T15:14:34Z","pushed_at":"2017-03-09T15:39:45Z","git_url":"git://github.com/ukparliament/parliament.uk-prototype.git","ssh_url":"git@github.com:ukparliament/parliament.uk-prototype.git","clone_url":"https://github.com/ukparliament/parliament.uk-prototype.git","svn_url":"https://github.com/ukparliament/parliament.uk-prototype","homepage":null,"size":1457,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":4,"forks":10,"open_issues":4,"watchers":1,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/pulls/274"},"html":{"href":"https://github.com/ukparliament/parliament.uk-prototype/pull/274"},"issue":{"href":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/issues/274"},"comments":{"href":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/issues/274/comments"},"review_comments":{"href":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/pulls/274/comments"},"review_comment":{"href":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/pulls/274/commits"},"statuses":{"href":"https://api.github.com/repos/ukparliament/parliament.uk-prototype/statuses/864bc73128d0784a29203d0676cb5019cceb13b5"}}}}
{"actor":{"display_login":"katylouise"}}