{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/search-admin/pulls/comments/30242557","id":30242557,"diff_hunk":"@@ -0,0 +1,8 @@\n+class SearchUrl\n+  def self.for(search_term)\n+    base_url = Plek.current.find('www')","path":"app/services/search_url.rb","position":3,"original_position":3,"commit_id":"b60d8829ad9f3f75a6dce50d55ab46d668728ebc","original_commit_id":"b60d8829ad9f3f75a6dce50d55ab46d668728ebc","user":{"login":"rboulton","id":73564,"avatar_url":"https://avatars.githubusercontent.com/u/73564?v=3","gravatar_id":"","url":"https://api.github.com/users/rboulton","html_url":"https://github.com/rboulton","followers_url":"https://api.github.com/users/rboulton/followers","following_url":"https://api.github.com/users/rboulton/following{/other_user}","gists_url":"https://api.github.com/users/rboulton/gists{/gist_id}","starred_url":"https://api.github.com/users/rboulton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rboulton/subscriptions","organizations_url":"https://api.github.com/users/rboulton/orgs","repos_url":"https://api.github.com/users/rboulton/repos","events_url":"https://api.github.com/users/rboulton/events{/privacy}","received_events_url":"https://api.github.com/users/rboulton/received_events","type":"User","site_admin":false},"body":"I think you just want `Plek.website_root` here.","created_at":"2015-05-13T15:27:44Z","updated_at":"2015-05-13T15:27:44Z","html_url":"https://github.com/alphagov/search-admin/pull/31#discussion_r30242557","pull_request_url":"https://api.github.com/repos/alphagov/search-admin/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/alphagov/search-admin/pulls/comments/30242557"},"html":{"href":"https://github.com/alphagov/search-admin/pull/31#discussion_r30242557"},"pull_request":{"href":"https://api.github.com/repos/alphagov/search-admin/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/search-admin/pulls/31","id":35328027,"html_url":"https://github.com/alphagov/search-admin/pull/31","diff_url":"https://github.com/alphagov/search-admin/pull/31.diff","patch_url":"https://github.com/alphagov/search-admin/pull/31.patch","issue_url":"https://api.github.com/repos/alphagov/search-admin/issues/31","number":31,"state":"open","locked":false,"title":"Show iframe with search results on query page","user":{"login":"tijmenb","id":233676,"avatar_url":"https://avatars.githubusercontent.com/u/233676?v=3","gravatar_id":"","url":"https://api.github.com/users/tijmenb","html_url":"https://github.com/tijmenb","followers_url":"https://api.github.com/users/tijmenb/followers","following_url":"https://api.github.com/users/tijmenb/following{/other_user}","gists_url":"https://api.github.com/users/tijmenb/gists{/gist_id}","starred_url":"https://api.github.com/users/tijmenb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tijmenb/subscriptions","organizations_url":"https://api.github.com/users/tijmenb/orgs","repos_url":"https://api.github.com/users/tijmenb/repos","events_url":"https://api.github.com/users/tijmenb/events{/privacy}","received_events_url":"https://api.github.com/users/tijmenb/received_events","type":"User","site_admin":false},"body":"To make it easier to see the effects of best/worst bets, we add an iframe with the actual search results on the query page. The iframe embeds the `gov.uk/search` page.\r\n\r\nAfter a best bet is deleted and added it can take a little time (a second or so) before elasticsearch returns the correct results. The iframe is therefore not guaranteed to be current after an update. This is mitigated by adding a callout with a warning and a button to refresh the iframe.\r\n\r\n### Screenshot\r\n\r\n![screen shot 2015-05-13 at 14 45 27](https://cloud.githubusercontent.com/assets/233676/7611816/cd794790-f97e-11e4-87e7-2fec5e3a843c.png)\r\n","created_at":"2015-05-13T13:47:15Z","updated_at":"2015-05-13T15:27:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a8d7e4045b8b7b4c41bed5ee6d75009b76d3820","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/search-admin/pulls/31/commits","review_comments_url":"https://api.github.com/repos/alphagov/search-admin/pulls/31/comments","review_comment_url":"https://api.github.com/repos/alphagov/search-admin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/search-admin/issues/31/comments","statuses_url":"https://api.github.com/repos/alphagov/search-admin/statuses/b60d8829ad9f3f75a6dce50d55ab46d668728ebc","head":{"label":"alphagov:add-iframe-for-search-results","ref":"add-iframe-for-search-results","sha":"b60d8829ad9f3f75a6dce50d55ab46d668728ebc","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":19340234,"name":"search-admin","full_name":"alphagov/search-admin","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/search-admin","description":"Admin for Search","fork":false,"url":"https://api.github.com/repos/alphagov/search-admin","forks_url":"https://api.github.com/repos/alphagov/search-admin/forks","keys_url":"https://api.github.com/repos/alphagov/search-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/search-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/search-admin/teams","hooks_url":"https://api.github.com/repos/alphagov/search-admin/hooks","issue_events_url":"https://api.github.com/repos/alphagov/search-admin/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/search-admin/events","assignees_url":"https://api.github.com/repos/alphagov/search-admin/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/search-admin/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/search-admin/tags","blobs_url":"https://api.github.com/repos/alphagov/search-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/search-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/search-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/search-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/search-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/search-admin/languages","stargazers_url":"https://api.github.com/repos/alphagov/search-admin/stargazers","contributors_url":"https://api.github.com/repos/alphagov/search-admin/contributors","subscribers_url":"https://api.github.com/repos/alphagov/search-admin/subscribers","subscription_url":"https://api.github.com/repos/alphagov/search-admin/subscription","commits_url":"https://api.github.com/repos/alphagov/search-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/search-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/search-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/search-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/search-admin/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/search-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/search-admin/merges","archive_url":"https://api.github.com/repos/alphagov/search-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/search-admin/downloads","issues_url":"https://api.github.com/repos/alphagov/search-admin/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/search-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/search-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/search-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/search-admin/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/search-admin/releases{/id}","created_at":"2014-05-01T09:06:07Z","updated_at":"2015-05-08T12:51:21Z","pushed_at":"2015-05-13T13:47:15Z","git_url":"git://github.com/alphagov/search-admin.git","ssh_url":"git@github.com:alphagov/search-admin.git","clone_url":"https://github.com/alphagov/search-admin.git","svn_url":"https://github.com/alphagov/search-admin","homepage":null,"size":821,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"d3c75341ea7fbb66e7a99ec127c0b3538691fd1c","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":19340234,"name":"search-admin","full_name":"alphagov/search-admin","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/search-admin","description":"Admin for Search","fork":false,"url":"https://api.github.com/repos/alphagov/search-admin","forks_url":"https://api.github.com/repos/alphagov/search-admin/forks","keys_url":"https://api.github.com/repos/alphagov/search-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/search-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/search-admin/teams","hooks_url":"https://api.github.com/repos/alphagov/search-admin/hooks","issue_events_url":"https://api.github.com/repos/alphagov/search-admin/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/search-admin/events","assignees_url":"https://api.github.com/repos/alphagov/search-admin/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/search-admin/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/search-admin/tags","blobs_url":"https://api.github.com/repos/alphagov/search-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/search-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/search-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/search-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/search-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/search-admin/languages","stargazers_url":"https://api.github.com/repos/alphagov/search-admin/stargazers","contributors_url":"https://api.github.com/repos/alphagov/search-admin/contributors","subscribers_url":"https://api.github.com/repos/alphagov/search-admin/subscribers","subscription_url":"https://api.github.com/repos/alphagov/search-admin/subscription","commits_url":"https://api.github.com/repos/alphagov/search-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/search-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/search-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/search-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/search-admin/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/search-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/search-admin/merges","archive_url":"https://api.github.com/repos/alphagov/search-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/search-admin/downloads","issues_url":"https://api.github.com/repos/alphagov/search-admin/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/search-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/search-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/search-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/search-admin/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/search-admin/releases{/id}","created_at":"2014-05-01T09:06:07Z","updated_at":"2015-05-08T12:51:21Z","pushed_at":"2015-05-13T13:47:15Z","git_url":"git://github.com/alphagov/search-admin.git","ssh_url":"git@github.com:alphagov/search-admin.git","clone_url":"https://github.com/alphagov/search-admin.git","svn_url":"https://github.com/alphagov/search-admin","homepage":null,"size":821,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/search-admin/pulls/31"},"html":{"href":"https://github.com/alphagov/search-admin/pull/31"},"issue":{"href":"https://api.github.com/repos/alphagov/search-admin/issues/31"},"comments":{"href":"https://api.github.com/repos/alphagov/search-admin/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/search-admin/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/search-admin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/search-admin/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/search-admin/statuses/b60d8829ad9f3f75a6dce50d55ab46d668728ebc"}}}}