{"action":"created","issue":{"url":"https://api.github.com/repos/mysociety/alaveteli/issues/2084","labels_url":"https://api.github.com/repos/mysociety/alaveteli/issues/2084/labels{/name}","comments_url":"https://api.github.com/repos/mysociety/alaveteli/issues/2084/comments","events_url":"https://api.github.com/repos/mysociety/alaveteli/issues/2084/events","html_url":"https://github.com/mysociety/alaveteli/pull/2084","id":53753954,"number":2084,"title":"[#2051] Add a “Back to search results” link","user":{"login":"garethrees","id":282788,"avatar_url":"https://avatars.githubusercontent.com/u/282788?v=3","gravatar_id":"","url":"https://api.github.com/users/garethrees","html_url":"https://github.com/garethrees","followers_url":"https://api.github.com/users/garethrees/followers","following_url":"https://api.github.com/users/garethrees/following{/other_user}","gists_url":"https://api.github.com/users/garethrees/gists{/gist_id}","starred_url":"https://api.github.com/users/garethrees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garethrees/subscriptions","organizations_url":"https://api.github.com/users/garethrees/orgs","repos_url":"https://api.github.com/users/garethrees/repos","events_url":"https://api.github.com/users/garethrees/events{/privacy}","received_events_url":"https://api.github.com/users/garethrees/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mysociety/alaveteli/labels/5+-+awaiting+review","name":"5 - awaiting review","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-08T14:10:05Z","updated_at":"2015-01-12T11:33:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mysociety/alaveteli/pulls/2084","html_url":"https://github.com/mysociety/alaveteli/pull/2084","diff_url":"https://github.com/mysociety/alaveteli/pull/2084.diff","patch_url":"https://github.com/mysociety/alaveteli/pull/2084.patch"},"body":"Fixes #2051 \r\n\r\nStore the search parameters in the flash when a search is made via the\r\nselect_authority_path page. Stores the parameters for both POST and \r\nAJAX typeahead searches.\r\n\r\nThe presence of stored search params renders the link on the\r\nPublicBodyController#show template.\r\n\r\n“keep”s the search params in PublicBodyController#show so that if the\r\nuser clicks the browser’s back button the “Back to search results” link\r\ncan still be rendered on the next search result they click.\r\n\r\n“keep”s the search params in ServicesController#other_country_message\r\nas it’s called through AJAX and ends up sweeping the flash. [1]\r\n\r\n\r\n[1] More details about this:\r\n    http://mikenaberezny.com/2007/09/08/keep-the-flash-and-test-it-too/"},"comment":{"url":"https://api.github.com/repos/mysociety/alaveteli/issues/comments/69557837","html_url":"https://github.com/mysociety/alaveteli/pull/2084#issuecomment-69557837","issue_url":"https://api.github.com/repos/mysociety/alaveteli/issues/2084","id":69557837,"user":{"login":"crowbot","id":2912,"avatar_url":"https://avatars.githubusercontent.com/u/2912?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbot","html_url":"https://github.com/crowbot","followers_url":"https://api.github.com/users/crowbot/followers","following_url":"https://api.github.com/users/crowbot/following{/other_user}","gists_url":"https://api.github.com/users/crowbot/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbot/subscriptions","organizations_url":"https://api.github.com/users/crowbot/orgs","repos_url":"https://api.github.com/users/crowbot/repos","events_url":"https://api.github.com/users/crowbot/events{/privacy}","received_events_url":"https://api.github.com/users/crowbot/received_events","type":"User","site_admin":false},"created_at":"2015-01-12T11:33:34Z","updated_at":"2015-01-12T11:33:34Z","body":":+1:  The only disadvantage I can think of this approach as opposed to using URL params is that requests with session data can't be cached, so more requests are going to be bypassing varnish. Given that the flash will only be set in the process of making a request, this seems like a reasonable tradeoff. "}}