{"action":"created","comment":{"url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/comments/79671361","id":79671361,"diff_hunk":"@@ -10,11 +10,24 @@ class ApplicationController < ActionController::Base\n   helper LinksHelper\n   helper_method :current_user\n   helper_method :sso_identity\n+  helper_method :current_estate\n \n   def current_user\n     sso_identity&.user\n   end\n \n+  def current_estate\n+    return unless sso_identity\n+    @_current_estate ||= begin\n+      estate_id = session[:current_estate]","path":"app/controllers/application_controller.rb","position":13,"original_position":13,"commit_id":"0d2e5c7035220609dfdfb6d1517171c04e5e1f38","original_commit_id":"a051ff2c2d757642877bc42b3713e9bf613ac1af","user":{"login":"mloughran","id":214,"avatar_url":"https://avatars.githubusercontent.com/u/214?v=3","gravatar_id":"","url":"https://api.github.com/users/mloughran","html_url":"https://github.com/mloughran","followers_url":"https://api.github.com/users/mloughran/followers","following_url":"https://api.github.com/users/mloughran/following{/other_user}","gists_url":"https://api.github.com/users/mloughran/gists{/gist_id}","starred_url":"https://api.github.com/users/mloughran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mloughran/subscriptions","organizations_url":"https://api.github.com/users/mloughran/orgs","repos_url":"https://api.github.com/users/mloughran/repos","events_url":"https://api.github.com/users/mloughran/events{/privacy}","received_events_url":"https://api.github.com/users/mloughran/received_events","type":"User","site_admin":false},"body":"The additional check is in place","created_at":"2016-09-20T17:49:19Z","updated_at":"2016-09-20T17:59:42Z","html_url":"https://github.com/ministryofjustice/prison-visits-2/pull/478#discussion_r79671361","pull_request_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/478","_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/comments/79671361"},"html":{"href":"https://github.com/ministryofjustice/prison-visits-2/pull/478#discussion_r79671361"},"pull_request":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/478"}}},"pull_request":{"url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/478","id":82353639,"html_url":"https://github.com/ministryofjustice/prison-visits-2/pull/478","diff_url":"https://github.com/ministryofjustice/prison-visits-2/pull/478.diff","patch_url":"https://github.com/ministryofjustice/prison-visits-2/pull/478.patch","issue_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/478","number":478,"state":"open","locked":false,"title":"Inbox switch","user":{"login":"alan","id":6356,"avatar_url":"https://avatars.githubusercontent.com/u/6356?v=3","gravatar_id":"","url":"https://api.github.com/users/alan","html_url":"https://github.com/alan","followers_url":"https://api.github.com/users/alan/followers","following_url":"https://api.github.com/users/alan/following{/other_user}","gists_url":"https://api.github.com/users/alan/gists{/gist_id}","starred_url":"https://api.github.com/users/alan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alan/subscriptions","organizations_url":"https://api.github.com/users/alan/orgs","repos_url":"https://api.github.com/users/alan/repos","events_url":"https://api.github.com/users/alan/events{/privacy}","received_events_url":"https://api.github.com/users/alan/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-23T12:17:14Z","updated_at":"2016-09-20T17:59:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8970dfcba048503bb79e74ef30a6465eb732b86","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/478/commits","review_comments_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/478/comments","review_comment_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/478/comments","statuses_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/statuses/0d2e5c7035220609dfdfb6d1517171c04e5e1f38","head":{"label":"ministryofjustice:inbox-switch","ref":"inbox-switch","sha":"0d2e5c7035220609dfdfb6d1517171c04e5e1f38","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":44737633,"name":"prison-visits-2","full_name":"ministryofjustice/prison-visits-2","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/prison-visits-2","description":"Staff interface and internal API for prison visits service","fork":false,"url":"https://api.github.com/repos/ministryofjustice/prison-visits-2","forks_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/forks","keys_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/events","assignees_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/merges","archive_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/deployments","created_at":"2015-10-22T10:12:32Z","updated_at":"2016-08-05T04:37:50Z","pushed_at":"2016-09-20T17:48:48Z","git_url":"git://github.com/ministryofjustice/prison-visits-2.git","ssh_url":"git@github.com:ministryofjustice/prison-visits-2.git","clone_url":"https://github.com/ministryofjustice/prison-visits-2.git","svn_url":"https://github.com/ministryofjustice/prison-visits-2","homepage":"","size":2154,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":4,"default_branch":"master"}},"base":{"label":"ministryofjustice:master","ref":"master","sha":"fcb81306919543a9d768538a126997e7bce89ca3","user":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"repo":{"id":44737633,"name":"prison-visits-2","full_name":"ministryofjustice/prison-visits-2","owner":{"login":"ministryofjustice","id":2203574,"avatar_url":"https://avatars.githubusercontent.com/u/2203574?v=3","gravatar_id":"","url":"https://api.github.com/users/ministryofjustice","html_url":"https://github.com/ministryofjustice","followers_url":"https://api.github.com/users/ministryofjustice/followers","following_url":"https://api.github.com/users/ministryofjustice/following{/other_user}","gists_url":"https://api.github.com/users/ministryofjustice/gists{/gist_id}","starred_url":"https://api.github.com/users/ministryofjustice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ministryofjustice/subscriptions","organizations_url":"https://api.github.com/users/ministryofjustice/orgs","repos_url":"https://api.github.com/users/ministryofjustice/repos","events_url":"https://api.github.com/users/ministryofjustice/events{/privacy}","received_events_url":"https://api.github.com/users/ministryofjustice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ministryofjustice/prison-visits-2","description":"Staff interface and internal API for prison visits service","fork":false,"url":"https://api.github.com/repos/ministryofjustice/prison-visits-2","forks_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/forks","keys_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/teams","hooks_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/hooks","issue_events_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/events{/number}","events_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/events","assignees_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/assignees{/user}","branches_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/branches{/branch}","tags_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/tags","blobs_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/refs{/sha}","trees_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/statuses/{sha}","languages_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/languages","stargazers_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/stargazers","contributors_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/contributors","subscribers_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/subscribers","subscription_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/subscription","commits_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/commits{/sha}","git_commits_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/git/commits{/sha}","comments_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/comments{/number}","issue_comment_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/comments{/number}","contents_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/contents/{+path}","compare_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/merges","archive_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/downloads","issues_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues{/number}","pulls_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls{/number}","milestones_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/milestones{/number}","notifications_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/labels{/name}","releases_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/releases{/id}","deployments_url":"https://api.github.com/repos/ministryofjustice/prison-visits-2/deployments","created_at":"2015-10-22T10:12:32Z","updated_at":"2016-08-05T04:37:50Z","pushed_at":"2016-09-20T17:48:48Z","git_url":"git://github.com/ministryofjustice/prison-visits-2.git","ssh_url":"git@github.com:ministryofjustice/prison-visits-2.git","clone_url":"https://github.com/ministryofjustice/prison-visits-2.git","svn_url":"https://github.com/ministryofjustice/prison-visits-2","homepage":"","size":2154,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/478"},"html":{"href":"https://github.com/ministryofjustice/prison-visits-2/pull/478"},"issue":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/478"},"comments":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/issues/478/comments"},"review_comments":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/478/comments"},"review_comment":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/pulls/478/commits"},"statuses":{"href":"https://api.github.com/repos/ministryofjustice/prison-visits-2/statuses/0d2e5c7035220609dfdfb6d1517171c04e5e1f38"}}}}
{"actor":{"display_login":"mloughran"}}