title: How to persist data about what page you are on in Rails app
body: <p>This will probably be easiest if I explain what I'm trying to do.  I have three actions in my Rails app controller, each rendering a different page.  The page-render is done with a single partial which uses variables that were set in the controller action code.  For example, each page has a list on it, but on one page the list is sortable.  Up to now I've been handling this by setting a <code>@sortable</code> flag to true or false in the code for my actions.  </p>
  
  <p>This works fine when an action is initially run.  The problem is that I have AJAX stuff going on (e.g. adding a new element to the list) and when this happens, I need to know the value of the <code>@sortable</code> variable again.  It seems to have gone, even though I'm still technically on the same page.  What I want is a variable store that is linked to the page you are on.</p>
  
  <p>What are your recommendations for doing this?  (Storing it in the Rails <code>session</code> hash seems like overkill - too much chance that the wrong value will get left in there by some yet-to-be-implemented action.)</p>
  
  <p>Ben</p>