title: Rails - How do I temporarily store a rails model instance?
body: <p>I have a rails model instance that needs to be persisted between requests without being saved to the database. </p>
  
  <p>The small application I'm working on allows customers to use a form to edit the instance parameters, submit the form back to the server, and then view a preview of their changes. Only when a SAVE button is pressed can the instance data be updated in the database.</p>
  
  <p>I was considering storing this data in a session, but some of the instance data could be heavy - e.g. long full page html strings, BERT serialized objects, etc.</p>
  
  <p>What is the best way to go about this? If there is a general method for this, I'd be glad to hear it. </p>
  
  <h2>MORE DETAILS</h2>
  
  <p>Generally, in this type of situation it wouldn't be necessary to persist the data between requests, because the form data will follow us from request to request. </p>
  
  <p>However, in this situation we have an iframe that is used to preview the recently updated data. The data needs to be persisted.. somehow.. so that the iframe can get it from a separate server request. </p>