title: How to maintain values of variable between multiple action call in rails
body: <p>I my project I am having varible</p>
  
  <pre><code>id=params[:id]
  status=params[:status]
  .....
  
  if(!status.nil?)
     if(status='off')
     flag[id]=1
     else
     flag[id]=2
     end
  else
     if(flag==1)
      puts off
     else
      puts on
  end
  </code></pre>
  
  <ul>
  <li><p>request come with status depending on status I am creating flag</p></li>
  <li><p>i want to use that flag in next call to the function when the status is nil</p></li>
  <li><p>My problem is that I am not getting the flag values in next call</p></li>
  <li><p>How to temporary store that values for later use</p></li>
  </ul>