title: Rails - storing search query/result
body: <p>I have a search page which finds candidates.
  From this page you can click view to find more information about the candidate.
  When on the candidate view you can click edit or do a number of other actions which would return you too the candidates view.</p>
  
  <p>My problem is from the candidates view I need to add a button to go back to the search results.
  I originally thought of using a JS button with history -1 but because the user can do other action from inside the view this won't work.</p>
  
  <p>I am still quite new to rails so not sure of my options... I am thinking some sort of caching of the results and then maybe a hidden field to keep track of the location of the cache(don't think this is the best solution as keeping track of the hidden value could get abit messy!)</p>
  
  <p>Thanks, Alex </p>