title: Updating and accessing a session with Ruby on Rails
body: <p>I'm working with ruby on rails 2.5.</p>
  
  <p>I have an object "payment_plan". This object can change with a toggle  behavior that changes, and I need to keep this object alive thorough all the session and at the end it should be save par of it in my <code>mongo</code> db. I need to access the latest status of the object always. The controller should be capable to update the object and the view should be able to access the latest state of the object. </p>
  
  <p>Any insights on how to do something like this would be great :) </p>
  
  <p>I have try to create a helper function in the application controller but had problem accessing it from the view. </p>
  
  <p>Also I prefer not to save the state of the object in the db, because it will be too many db calls later. </p>